diff options
author | Richard Guenther <rguenther@suse.de> | 2010-05-30 15:26:53 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-05-30 15:26:53 +0000 |
commit | fbd767b1b5d7c560272275e9e70f52f4f3a4e715 (patch) | |
tree | e747e9cb42e29a3227dda6807b270fd8f3e6f6de | |
parent | 0a5fa5a1a212c8096f2ee246ef1739ba0083e213 (diff) | |
download | gcc-fbd767b1b5d7c560272275e9e70f52f4f3a4e715.zip gcc-fbd767b1b5d7c560272275e9e70f52f4f3a4e715.tar.gz gcc-fbd767b1b5d7c560272275e9e70f52f4f3a4e715.tar.bz2 |
tree-cfg.c (verify_gimple_assign_single): Implement verification for COND_EXPR rhs.
2010-05-30 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_gimple_assign_single): Implement
verification for COND_EXPR rhs.
From-SVN: r160055
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87f74a6..26b1dbb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-05-30 Richard Guenther <rguenther@suse.de> + + * tree-cfg.c (verify_gimple_assign_single): Implement + verification for COND_EXPR rhs. + 2010-05-30 Jan Hubicka <jh@suse.cz> * cgraph.h (cgraph_dump_file): Declare. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index fc6ee35..18754c4 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3608,6 +3608,20 @@ verify_gimple_assign_single (gimple stmt) return res; case COND_EXPR: + if (!is_gimple_reg (lhs) + || (!is_gimple_reg (TREE_OPERAND (rhs1, 0)) + && !COMPARISON_CLASS_P (TREE_OPERAND (rhs1, 0))) + || (!is_gimple_reg (TREE_OPERAND (rhs1, 1)) + && !is_gimple_min_invariant (TREE_OPERAND (rhs1, 1))) + || (!is_gimple_reg (TREE_OPERAND (rhs1, 2)) + && !is_gimple_min_invariant (TREE_OPERAND (rhs1, 2)))) + { + error ("invalid COND_EXPR in gimple assignment"); + debug_generic_stmt (rhs1); + return true; + } + return res; + case CONSTRUCTOR: case OBJ_TYPE_REF: case ASSERT_EXPR: |