Daily bump.
[gcc.git] / gcc / testsuite / gcc.dg / Wrestrict-17.c
1 /* PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
2 a variable-length struct
3 { dg-do compile }
4 { dg-require-effective-target alloca }
5 { dg-options "-O2 -Wall" } */
6
7 int f (int n)
8 {
9 typedef struct { int a[n]; } S;
10
11 S a;
12 __attribute__ ((noinline)) S g (void) { return a; }
13
14 a.a[0] = 1;
15 a.a[9] = 2;
16
17 S b;
18 b = g ();
19
20 return b.a[0] == 1 && b.a[9] == 2;
21 }