]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR lto/41159 ([LTO] ICE in insert_value_copy_on_edge, at tree-outof...
authorUros Bizjak <ubizjak@gmail.com>
Wed, 21 Dec 2011 17:23:33 +0000 (18:23 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 21 Dec 2011 17:23:33 +0000 (18:23 +0100)
Backport from mainline
2011-12-21  Richard Guenther  <rguenther@suse.de>

PR lto/41159
* tree-outof-ssa.c (insert_value_copy_on_edge): Use the
mode of the pseudo as destination mode.  Only assert that
is equal to the promoted mode of the decl if it is a REG.

From-SVN: r182597

gcc/ChangeLog
gcc/tree-outof-ssa.c

index ccc55c9caa1f9207b3c7186b6956c0991db042ea..207be0da6819c7d90e415baffd50ac2a55d5f024 100644 (file)
@@ -1,3 +1,13 @@
+2011-12-21  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2011-12-21  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41159
+       * tree-outof-ssa.c (insert_value_copy_on_edge): Use the
+       mode of the pseudo as destination mode.  Only assert that
+       is equal to the promoted mode of the decl if it is a REG.
+
 2011-12-21  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/alpha/linux-unwind.h: Update copyright years.
index ee70583422e45204740beaddbfe94e69d9852aba..54682018110a4674953514b57bf84aaee98428a9 100644 (file)
@@ -233,9 +233,10 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
 
   var = SSA_NAME_VAR (partition_to_var (SA.map, dest));
   src_mode = TYPE_MODE (TREE_TYPE (src));
-  dest_mode = promote_decl_mode (var, &unsignedp);
+  dest_mode = GET_MODE (SA.partition_to_pseudo[dest]);
   gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var)));
-  gcc_assert (dest_mode == GET_MODE (SA.partition_to_pseudo[dest]));
+  gcc_assert (!REG_P (SA.partition_to_pseudo[dest])
+             || dest_mode == promote_decl_mode (var, &unsignedp));
 
   if (src_mode != dest_mode)
     {