1 /* { dg-do run } */
2 /* { dg-options "-g -fno-tree-sra" } */
3
4 void abort (void);
5
6 struct A
7 {
8 int i[100];
9 };
10
11 struct A a1 __attribute__((used)), a3;
12
13 __attribute__((noinline)) struct A
14 f ()
15 {
16 struct A a2;
17 a2.i[0] = 42;
18 if (a3.i[0] != 0)
19 abort ();
20 a2.i[4] = 7; /* { dg-final { gdb-test . "a2.i\[0\]" "42" } } */
21 return a2;
22 }
23
24 int
25 main ()
26 {
27 a1 = f ();
28 return 0;
29 }