diff options
author | Jeff Law <law@redhat.com> | 2005-07-13 10:31:23 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2005-07-13 10:31:23 -0600 |
commit | 59f7a2023f89b0405726d42a2391bb12efb1458c (patch) | |
tree | 74485a550b11de6d6b4c0f96a5a04ad88b50adb4 /gcc/testsuite | |
parent | 4969c0d82c8bc9a2815883e3c968d81287c83483 (diff) | |
download | gcc-59f7a2023f89b0405726d42a2391bb12efb1458c.zip gcc-59f7a2023f89b0405726d42a2391bb12efb1458c.tar.gz gcc-59f7a2023f89b0405726d42a2391bb12efb1458c.tar.bz2 |
fold-const.c (fold_binary): When comparing two simple ADDR_EXPR expressions...
* fold-const.c (fold_binary): When comparing two simple ADDR_EXPR
expressions, test their _DECL operands for pointer equality rather
than using operand_equal_p.
* gcc.dg/tree-ssa/pr22321.c: New test.
From-SVN: r101974
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr22321.c | 20 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ebc793e..145830f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-07-13 Jeff Law <law@redhat.com> + + * gcc.dg/tree-ssa/pr22321.c: New test + 2005-07-13 Paolo Bonzini <bonzini@gnu.org> PR tree-optimization/21921 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr22321.c b/gcc/testsuite/gcc.dg/tree-ssa/pr22321.c new file mode 100644 index 0000000..64a94ab --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr22321.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fno-tree-vrp -fno-tree-copy-prop -fno-tree-ccp -fdump-tree-optimized" } */ + + +volatile int x; + +int main () +{ + volatile int *vip; + vip = &x; + volatile int *cvip; + cvip = vip; + + if (vip != cvip) return -1; + return 0; +} + +/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */ + |