From: Richard Sandiford Date: Wed, 12 Aug 2009 16:28:36 +0000 (+0000) Subject: re PR bootstrap/41031 (ICE in insert_value_copy_on_edge preventing bootstrap on sparc... X-Git-Tag: releases/gcc-4.5.0~4058 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a58473d7b5cb84c43da1a7749b29a96a4bfbad;p=thirdparty%2Fgcc.git re PR bootstrap/41031 (ICE in insert_value_copy_on_edge preventing bootstrap on sparc64 and s390x, testcase on cris-elf) 2009-08-12 Richard Sandiford PR tree-optimization/41031 * tree-outof-ssa.c (insert_value_copy_on_edge): Use promote_decl_mode on the partition variable rather than promote_mode on the source type. Assert that the partition variable's type has the same mode as the source value's. From-SVN: r150701 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cea1ba72fe9..9af6c7172f61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-08-12 Richard Sandiford + + PR tree-optimization/41031 + * tree-outof-ssa.c (insert_value_copy_on_edge): Use promote_decl_mode + on the partition variable rather than promote_mode on the source + type. Assert that the partition variable's type has the same + mode as the source value's. + 2009-08-12 Paolo Bonzini * doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index c0826e704239..220171ca7f9d 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -197,6 +197,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus) rtx seq, x; enum machine_mode dest_mode, src_mode; int unsignedp; + tree var; if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -217,9 +218,10 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus) start_sequence (); + var = SSA_NAME_VAR (partition_to_var (SA.map, dest)); src_mode = TYPE_MODE (TREE_TYPE (src)); - unsignedp = TYPE_UNSIGNED (TREE_TYPE (src)); - dest_mode = promote_mode (TREE_TYPE (src), src_mode, &unsignedp); + dest_mode = promote_decl_mode (var, &unsignedp); + gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var))); gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest])); if (src_mode != dest_mode)