summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr49120.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr49120.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr49120.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr49120.c b/gcc/testsuite/gcc.dg/pr49120.c
new file mode 100644
index 000000000..1a65222cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr49120.c
@@ -0,0 +1,11 @@
+/* PR c/49120 */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+int
+main ()
+{
+ int a = 1;
+ int c = ({ char b[a + 1]; b[0] = 0; b[0]; });
+ return c;
+}