summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr82564.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr82564.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr82564.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr82564.c b/gcc/testsuite/gcc.c-torture/compile/pr82564.c
new file mode 100644
index 00000000000..039f55a3985
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr82564.c
@@ -0,0 +1,15 @@
+/* PR middle-end/82564 */
+/* { dg-require-effective-target alloca } */
+
+int
+main ()
+{
+ int t = 8, i;
+ typedef struct { char v[t]; } B;
+ B a, b;
+ B __attribute__ ((noinline)) f () { return b; }
+ for (i = 0; i < 8; i++)
+ b.v[i] = i;
+ a = f ();
+ return 0;
+}