2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / dse.c
blob4a859ae03e7f18fd886f5beee24d456b9941812f
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse-details" } */
4 #define N 256
6 struct
8 int x;
9 int y;
10 } S[100];
12 int z[100];
14 int
15 foo (void)
17 int i;
18 int x, y;
20 S[5].x = 0;
21 S[5].y = 0;
23 x = 5 + z[0];
24 y = z[0];
26 S[5].x = x;
27 S[5].y = y;
30 /* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1" } } */
31 /* { dg-final { cleanup-tree-dump "dse*" } } */