diff options
author | Richard Guenther <rguenther@suse.de> | 2009-09-05 19:32:25 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-09-05 19:32:25 +0000 |
commit | 6a12956780befeb93b3b126e62704c2f78f19a8a (patch) | |
tree | 06dfa885f9390ffac7111b08d8e1b00586f69dfb /gcc/tree-ssa-ccp.c | |
parent | 432b4b3129cd15f0971a0bbc9c1518d96ea6a4ae (diff) | |
download | gcc-6a12956780befeb93b3b126e62704c2f78f19a8a.zip gcc-6a12956780befeb93b3b126e62704c2f78f19a8a.tar.gz gcc-6a12956780befeb93b3b126e62704c2f78f19a8a.tar.bz2 |
re PR tree-optimization/41181 (internal compiler error when using x86_64-w64-mingw32-gcc to build ffmpeg ac3enc.c)
2009-09-05 Richard Guenther <rguenther@suse.de>
PR middle-end/41181
* tree-ssa-ccp.c (maybe_fold_stmt_addition): Use the correct type.
* gcc.c-torture/compile/pr41181.c: New testcase.
From-SVN: r151455
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r-- | gcc/tree-ssa-ccp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 949c4b5..14ffdfe 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -2214,16 +2214,16 @@ maybe_fold_stmt_addition (location_t loc, tree res_type, tree op0, tree op1) && TREE_CODE (gimple_assign_rhs2 (offset_def)) == INTEGER_CST && tree_int_cst_equal (gimple_assign_rhs2 (offset_def), TYPE_SIZE_UNIT (TREE_TYPE (op0)))) - return build1 (ADDR_EXPR, res_type, - build4 (ARRAY_REF, TREE_TYPE (op0), + return build_fold_addr_expr + (build4 (ARRAY_REF, TREE_TYPE (op0), TREE_OPERAND (op0, 0), gimple_assign_rhs1 (offset_def), TREE_OPERAND (op0, 2), TREE_OPERAND (op0, 3))); else if (integer_onep (TYPE_SIZE_UNIT (TREE_TYPE (op0))) && gimple_assign_rhs_code (offset_def) != MULT_EXPR) - return build1 (ADDR_EXPR, res_type, - build4 (ARRAY_REF, TREE_TYPE (op0), + return build_fold_addr_expr + (build4 (ARRAY_REF, TREE_TYPE (op0), TREE_OPERAND (op0, 0), op1, TREE_OPERAND (op0, 2), |