2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-array5.C
blob00dfd6db4dfa2798ed15354dbce2a1c47e1c15b0
1 // PR c++/56582
2 // { dg-do compile { target c++11 } }
4 // Reliable ICE
5 constexpr int n[3] = {};
6 constexpr int k = n[-1];            // { dg-error "array subscript" }
8 // Some random byte
9 constexpr char c = "foo"[-1000];    // { dg-error "array subscript" }