]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/modref-dse-3.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / modref-dse-3.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse1-details" } */
3 __attribute__ ((noinline))
4 void write (int *a)
5 {
6 *a=1;
7 a[1]=2;
8 }
9 int test ()
10 {
11 int a;
12 a=2;
13 write (&a);
14 return a;
15 }
16 int test2 (int *a)
17 {
18 *a=2;
19 write (a);
20 return *a;
21 }
22 /* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1"} } */