| 1 |
// PR c++/56582 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
// Reliable ICE |
| 5 |
constexpr int n[3] = {}; |
| 6 |
constexpr int k = n[-1]; // { dg-error "array subscript" } |
| 7 |
|
| 8 |
// Some random byte |
| 9 |
constexpr char c = "foo"[-1000]; // { dg-error "array subscript" } |