diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr120057-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr120057-2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr120057-2.c b/gcc/testsuite/gcc.dg/pr120057-2.c new file mode 100644 index 0000000..1372baf --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr120057-2.c @@ -0,0 +1,11 @@ +/* PR c/120057 */ +/* { dg-do compile } */ +/* { dg-options "-std=c23" } */ + +constexpr signed char foo[65] = { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 129, 11, 12, 13, 14, 15, 16, /* { dg-error "'constexpr' initializer not representable in type of object" } */ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 1 +}; |