diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2015-07-04 13:15:33 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2015-07-04 11:15:33 +0000 |
commit | 3958eee171b1d9c173e674031b0091097bb17a5a (patch) | |
tree | fafde1287bf94623a5f5c169289ad02df3a7b899 | |
parent | 6b402fbeacb48bc6f8cd7637e8c0865d76ba18ab (diff) | |
download | gcc-3958eee171b1d9c173e674031b0091097bb17a5a.zip gcc-3958eee171b1d9c173e674031b0091097bb17a5a.tar.gz gcc-3958eee171b1d9c173e674031b0091097bb17a5a.tar.bz2 |
tree-cfg.c (verify_gimple_assign_ternary): Check the first argument.
2015-07-04 Marc Glisse <marc.glisse@inria.fr>
* tree-cfg.c (verify_gimple_assign_ternary) <VEC_COND_EXPR>: Check
the first argument.
From-SVN: r225411
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 50f0a54..4f60a00 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-04 Marc Glisse <marc.glisse@inria.fr> + + * tree-cfg.c (verify_gimple_assign_ternary) <VEC_COND_EXPR>: Check + the first argument. + 2015-07-03 Paolo Carlini <paolo.carlini@oracle.com> * attribs.c (decl_attributes): Guard inform with the return value diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 94ed957..f47795a 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4001,8 +4001,22 @@ verify_gimple_assign_ternary (gassign *stmt) } break; - case COND_EXPR: case VEC_COND_EXPR: + if (!VECTOR_INTEGER_TYPE_P (rhs1_type) + || TYPE_SIGN (rhs1_type) != SIGNED + || TYPE_SIZE (rhs1_type) != TYPE_SIZE (lhs_type) + || TYPE_VECTOR_SUBPARTS (rhs1_type) + != TYPE_VECTOR_SUBPARTS (lhs_type)) + { + error ("the first argument of a VEC_COND_EXPR must be of a signed " + "integral vector type of the same size and number of " + "elements as the result"); + debug_generic_expr (lhs_type); + debug_generic_expr (rhs1_type); + return true; + } + /* Fallthrough. */ + case COND_EXPR: if (!useless_type_conversion_p (lhs_type, rhs2_type) || !useless_type_conversion_p (lhs_type, rhs3_type)) { |