From cc99c5fefc057335b9ed6928d997c49bf3ff6575 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 15 Sep 2010 17:42:41 +0200 Subject: re PR tree-optimization/45633 (internal compiler error: verify_stmts failed) PR tree-optimization/45633 * tree-cfg.c (verify_gimple_assign_binary): Allow MINUS_EXPR with lhs and rhs1 pointer vector and rhs2 sizetype vector. * expr.c (expand_expr_real_2) : For pointer or vector pointer use TER to optimize pointer subtraction. * gcc.dg/vect/pr45633.c: New test. From-SVN: r164312 --- gcc/tree-cfg.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gcc/tree-cfg.c') diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index b8afb57..be8a84f 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3448,8 +3448,9 @@ verify_gimple_assign_binary (gimple stmt) } case PLUS_EXPR: + case MINUS_EXPR: { - /* We use regular PLUS_EXPR for vectors. + /* We use regular PLUS_EXPR and MINUS_EXPR for vectors. ??? This just makes the checker happy and may not be what is intended. */ if (TREE_CODE (lhs_type) == VECTOR_TYPE @@ -3474,10 +3475,6 @@ verify_gimple_assign_binary (gimple stmt) } goto do_pointer_plus_expr_check; } - } - /* Fallthru. */ - case MINUS_EXPR: - { if (POINTER_TYPE_P (lhs_type) || POINTER_TYPE_P (rhs1_type) || POINTER_TYPE_P (rhs2_type)) -- cgit v1.1