2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / writeonly.c
blob5680c4892519fd3e71d0351c49ccde7141cb75bc
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
3 static struct a {int magic1,b;} a;
4 volatile int magic2;
5 static struct b {int a,b,c,d,e,f;} magic3;
7 struct b foo();
9 void
10 t()
12 a.magic1 = 1;
13 magic2 = 1;
14 magic3 = foo();
16 /* { dg-final { scan-tree-dump-not "magic1" "optimized"} } */
17 /* { dg-final { scan-tree-dump-not "magic3" "optimized"} } */
18 /* { dg-final { scan-tree-dump "magic2" "optimized"} } */
19 /* { dg-final { scan-tree-dump "foo" "optimized"} } */