c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / modref-dse-1.c
blob1f80cc57c57c364642306e01c34bcd20c1a03261
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse1-details" } */
3 volatile int *ptr;
4 struct a {
5 int a,b,c;
6 } a;
7 __attribute__((noinline))
8 static int init (struct a*a)
10 a->a=0;
11 a->b=1;
13 __attribute__((noinline))
14 static int use (struct a*a)
16 if (a->c != 3)
17 *ptr=5;
20 void
21 main(void)
23 struct a a;
24 init (&a);
25 a.c=3;
26 use (&a);
28 /* { dg-final { scan-tree-dump "Deleted dead store: init" "dse1" } } */