OSDN Git Service

* g++.dg/opt/nothrow1.C: Use cleanup-tree-dump.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20040729-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dce3" } */
3
4 foo ()
5 {
6   volatile int *p;
7   volatile int x;
8
9   p = &x;
10   *p = 3;
11   return *p + 1;
12 }
13
14 /* The assignment to 'p' is dead and should be removed.  But the
15    compiler was mistakenly thinking that the statement had volatile
16    operands.  But 'p' itself is not volatile and taking the address of
17    a volatile does not constitute a volatile operand.  */
18 /* { dg-final { scan-tree-dump-times "&x" 0 "dce3"} } */
19 /* { dg-final { cleanup-tree-dump "dce3" } } */