diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/vla15.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/vla15.C | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/vla15.C b/gcc/testsuite/g++.dg/ext/vla15.C new file mode 100644 index 00000000000..feeb49ff280 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/vla15.C @@ -0,0 +1,20 @@ +// PR c++/44613 +// { dg-do run } +// { dg-options "" } + +void *volatile p; + +int +main (void) +{ + int n = 0; + lab:; + int x[n % 1000 + 1]; + x[0] = 1; + x[n % 1000] = 2; + p = x; + n++; + if (n < 1000000) + goto lab; + return 0; +} |