repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
constexpr-array5.C
blob
00dfd6db4dfa2798ed15354dbce2a1c47e1c15b0
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" }