PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / Wrestrict-17.c
blob8061fda5985b59967bff97ae13d0a6decf036779
1 /* PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
2 a variable-length struct
3 { dg-do compile }
4 { dg-options "-O2 -Wall" } */
6 int f (int n)
8 typedef struct { int a[n]; } S;
10 S a;
11 __attribute__ ((noinline)) S g (void) { return a; }
13 a.a[0] = 1;
14 a.a[9] = 2;
16 S b;
17 b = g ();
19 return b.a[0] == 1 && b.a[9] == 2;