diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/array5.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/array5.C | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/array5.C b/gcc/testsuite/g++.old-deja/g++.other/array5.C new file mode 100644 index 000000000..e32bbea5a --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/array5.C @@ -0,0 +1,10 @@ +// { dg-do assemble } +// We tried to create a temporary of unknown size and crashed. + +extern int a1[]; +extern int a2[]; +int foo(int p) +{ + int x = (p ? a1 : a2)[1]; + return x; +} |