diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-05 13:57:06 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-05 13:57:06 +0000 |
commit | 4c29d398a1296efe38645675bd783f2aa0958eda (patch) | |
tree | 1bbbc089162b201e4346c19a838fed85a7a4d594 /gcc/tree-ssa.c | |
parent | 9cc348f678c2d73ca7379b82c64a8a9b3f4849dc (diff) | |
download | gcc-4c29d398a1296efe38645675bd783f2aa0958eda.tar.gz |
2004-10-05 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa.c (verify_ssa): Verify phi arguments only
contain renamed names.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88554 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 1ddaf7d3e66..4b79989d502 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -541,9 +541,22 @@ verify_ssa (void) block_stmt_iterator bsi; for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) - if (verify_def (bb, definition_block, PHI_RESULT (phi), phi, + { + int i; + if (verify_def (bb, definition_block, PHI_RESULT (phi), phi, !is_gimple_reg (PHI_RESULT (phi)))) goto err; + for (i = 0; i < PHI_NUM_ARGS (phi); i++) + { + tree def = PHI_ARG_DEF (phi, i); + if (TREE_CODE (def) != SSA_NAME && !is_gimple_min_invariant (def)) + { + error ("PHI argument is not SSA_NAME, or invariant"); + print_generic_stmt (stderr, phi, TDF_VOPS); + goto err; + } + } + } for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) { |