diff options
author | Richard Guenther <rguenther@suse.de> | 2011-02-08 12:53:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-02-08 12:53:50 +0000 |
commit | 62902f3fea6432056c9e1c95d574ca133cfe5b8d (patch) | |
tree | b4679c2ae034f9d8709f6f23f651ba05bc6d4734 /gcc/tree-ssa.c | |
parent | 0efb9d64adf43e0022940478d7ffcf70a92f4305 (diff) | |
download | gcc-62902f3fea6432056c9e1c95d574ca133cfe5b8d.zip gcc-62902f3fea6432056c9e1c95d574ca133cfe5b8d.tar.gz gcc-62902f3fea6432056c9e1c95d574ca133cfe5b8d.tar.bz2 |
re PR lto/47641 (gcc.dg/lto/20101009-1 c_lto_20101009-1_0.o-c_lto_20101009-1_0.o link ICE)
2011-02-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47641
* tree-ssa.c (execute_update_addresses_taken): For asm outputs
require type compatibility.
From-SVN: r169925
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 90fb5dd..cc8c83d 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1898,7 +1898,7 @@ non_rewritable_lvalue_p (tree lhs) /* A decl that is wrapped inside a MEM-REF that covers it full is also rewritable. ??? The following could be relaxed allowing component - references that do not change the access size. */ ; + references that do not change the access size. */ if (TREE_CODE (lhs) == MEM_REF && TREE_CODE (TREE_OPERAND (lhs, 0)) == ADDR_EXPR && integer_zerop (TREE_OPERAND (lhs, 1))) @@ -2039,11 +2039,16 @@ execute_update_addresses_taken (void) { tree link = gimple_asm_output_op (stmt, i); tree lhs = TREE_VALUE (link); - if (TREE_CODE (lhs) != SSA_NAME - && non_rewritable_lvalue_p (lhs)) + if (TREE_CODE (lhs) != SSA_NAME) { decl = get_base_address (lhs); - if (DECL_P (decl)) + if (DECL_P (decl) + && (non_rewritable_lvalue_p (lhs) + /* We cannot move required conversions from + the lhs to the rhs in asm statements, so + require we do not need any. */ + || !useless_type_conversion_p + (TREE_TYPE (lhs), TREE_TYPE (decl)))) bitmap_set_bit (not_reg_needs, DECL_UID (decl)); } } |