]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-15.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-dse-15.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dse1-details" } */
3
4 void *foo (int *p)
5 {
6 void *q;
7 /* We should be able to DSE this store (p may point to errno). */
8 *p = 0;
9 q = __builtin_malloc (4);
10 *p = 0;
11 return q;
12 }
13
14 int j;
15 void bar (int *i)
16 {
17 /* This store is dead as well. */
18 j = 1;
19 *i = 0;
20 j = 2;
21 }
22
23 /* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1" } } */