PR tree-optimization/33562
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20031106-2.c
blob9d177780514b98080cd1c74a7a98480e2c45c2f5
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 extern void link_error (void);
6 /* Check for dead stores to a struct. */
8 struct s
10 char d;
11 int a, b;
12 double m;
15 void foo (struct s* teststruct)
17 teststruct->a = 0;
18 teststruct->a++;
19 if (teststruct->a != 1)
20 link_error ();
23 /* There should be only one reference to "teststruct" and one in the function header. */
24 /* { dg-final { scan-tree-dump-times "teststruct" 2 "optimized" } } */
26 /* There should be no link_error calls. */
27 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */