More fold_negate in match.pd
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / sra-16.c
blobfef34c0d8272c46ade1e99d0ed5ccedd1f24da97
1 /* Verify that SRA total scalarization works on records containing arrays. */
2 /* { dg-do run } */
3 /* { dg-options "-O1 -fdump-tree-release_ssa --param sra-max-scalarization-size-Ospeed=16" } */
5 extern void abort (void);
7 struct S
9 long zilch[0];
10 char c;
11 int i;
12 unsigned short f3, f4;
16 int __attribute__ ((noinline))
17 foo (struct S *p)
19 struct S l;
21 l = *p;
22 l.i++;
23 l.f3++;
24 *p = l;
27 int
28 main (int argc, char **argv)
30 struct S a = { { }, 0, 4, 0, 0};
31 foo (&a);
32 if (a.i != 5 || a.f3 != 1)
33 abort ();
34 return 0;
37 /* { dg-final { scan-tree-dump-times "l;" 0 "release_ssa" } } */