diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-13 15:33:17 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-13 15:33:17 +0000 |
commit | 4efa33ae7e2ae6081af93b99674da4707e2cdb90 (patch) | |
tree | bbc563f0437c0a8340dd241f0a15f7d13ce82259 /gcc/testsuite/gcc.dg/tree-ssa/pr20702.c | |
parent | f21dcb286d580bafe85dcfc2a5f817a16fd27fb1 (diff) | |
download | gcc-4efa33ae7e2ae6081af93b99674da4707e2cdb90.tar.gz |
gcc/
PR tree-optimization/20913
* tree-ssa-copy.c (copy_prop_visit_cond_stmt): Fold COND_EXPR.
testsuite/
PR tree-optimization/20913
* gcc.dg/tree-ssa/pr20913.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98091 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr20702.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr20702.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c b/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c new file mode 100644 index 00000000000..c6f1ae6654f --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c @@ -0,0 +1,28 @@ +/* PR tree-optimization/20702 + VRP did not insert ASSERT_EXPRs into dominator dominator children + of a basic block ending with COND_EXPR unless the children are also + immediate successors of the basic block. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */ + +extern void bar (int); + +int +foo (int *p, int b) +{ + int a; + + if (b) + bar (123); + else + bar (321); + + a = *p; + if (p == 0) + return 0; + + return a; +} + +/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */ |