diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2007-10-06 11:43:56 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2007-10-06 11:43:56 +0000 |
commit | e9705dc5e5455d23dc95476198b3f5679f73aa5a (patch) | |
tree | 1cd6bcc5b4ac6c6236e9743d63e7db677cea72c6 /gcc/tree-cfg.c | |
parent | ac5ba373739e0fbfd2385e5fa427629ce328e718 (diff) | |
download | gcc-e9705dc5e5455d23dc95476198b3f5679f73aa5a.zip gcc-e9705dc5e5455d23dc95476198b3f5679f73aa5a.tar.gz gcc-e9705dc5e5455d23dc95476198b3f5679f73aa5a.tar.bz2 |
re PR tree-optimization/33572 (wrong code with -O)
gcc/ChangeLog:
PR tree-optimization/33572
* tree-cfg.c (verify_stmts): Check for missing PHI defs.
* tree-inline.c (update_ssa_across_eh_edges): Renamed to...
(update_ssa_across_abnormal_edges): ... this. Set slots in the
return PHI node.
(copy_edges_for_bb): Handle nonlocal label edges.
(make_nonlocal_label_edges): Deleted.
(optimize_inline_calls): Don't call it.
gcc/testsuite/ChangeLog:
PR tree-optimization/33572
* g++.dg/torture/pr33572.C: New.
From-SVN: r129051
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 7b21ddc..dd817ad 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4279,11 +4279,18 @@ verify_stmts (void) tree t = PHI_ARG_DEF (phi, i); tree addr; + if (!t) + { + error ("missing PHI def"); + debug_generic_stmt (phi); + err |= true; + continue; + } /* Addressable variables do have SSA_NAMEs but they are not considered gimple values. */ - if (TREE_CODE (t) != SSA_NAME - && TREE_CODE (t) != FUNCTION_DECL - && !is_gimple_val (t)) + else if (TREE_CODE (t) != SSA_NAME + && TREE_CODE (t) != FUNCTION_DECL + && !is_gimple_val (t)) { error ("PHI def is not a GIMPLE value"); debug_generic_stmt (phi); |