re PR lto/41159 ([LTO] ICE in insert_value_copy_on_edge, at tree-outof-ssa.c:225)
authorRichard Guenther <rguenther@suse.de>
Wed, 21 Dec 2011 09:22:58 +0000 (09:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 21 Dec 2011 09:22:58 +0000 (09:22 +0000)
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: r182570

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

index fc767027664e084b3d681fb50e01588f4c9b5bea..2fd7a51a4087e94e79e74aca9fd3c6358746614b 100644 (file)
@@ -1,3 +1,10 @@
+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  Tristan Gingold  <gingold@adacore.com>
 
        * config/vms/xm-vms.h (STANDARD_EXEC_PREFIX): Remove define.
index 45060f70eb024cf97fb189575ce2396f06c90e7f..f52b26030121e0d87922cc127c99e21436c6e6c5 100644 (file)
@@ -237,9 +237,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)
     {