aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C
blob: 00dfd6db4dfa2798ed15354dbce2a1c47e1c15b0 (plain)
1
2
3
4
5
6
7
8
9
// PR c++/56582
// { dg-do compile { target c++11 } }

// Reliable ICE
constexpr int n[3] = {};
constexpr int k = n[-1];            // { dg-error "array subscript" }

// Some random byte
constexpr char c = "foo"[-1000];    // { dg-error "array subscript" }