re PR middle-end/30667 (ICE in immed_double_const, at emit-rtl.c:468)
authorUros Bizjak <ubizjak@gmail.com>
Sat, 3 Feb 2007 23:39:31 +0000 (00:39 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 3 Feb 2007 23:39:31 +0000 (00:39 +0100)
        PR middle-end/30667
        * combine.c (try_combine): Do not substitute source operand
        with constants wider than 2 * HOST_BITS_PER_WIDE_INT.

testsuite/ChangeLog:

        PR middle-end/30667
        * gfortran.dg/pr30667.f: New test.

From-SVN: r121555

gcc/ChangeLog
gcc/combine.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr30667.f [new file with mode: 0644]

index d8ee26993cd913f7b5d7ceabf37ebf059572da73..fbf14560fd3dcdb0fcdf08a64e2e07a7b3f59b32 100644 (file)
@@ -1,3 +1,9 @@
+2007-02-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR middle-end/30667
+       * combine.c (try_combine): Do not substitute source operand
+       with constants wider than 2 * HOST_BITS_PER_WIDE_INT.
+
 2007-02-03  Jan Hubicka  <jh@suse.cz>
 
        PR gcov-profile/30650
index aa1e2ce203406d1d4f78f4295126a886436531d6..6605b7a35584ad29bf2bd2a086c6d8ba3d5f432b 100644 (file)
@@ -2003,7 +2003,9 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
            offset = -1;
        }
 
-      if (offset >= 0)
+      if (offset >= 0
+         && (GET_MODE_BITSIZE (GET_MODE (SET_DEST (temp)))
+             <= HOST_BITS_PER_WIDE_INT * 2))
        {
          HOST_WIDE_INT mhi, ohi, ihi;
          HOST_WIDE_INT mlo, olo, ilo;
index 7ec593780d244cca9fcb46d27c3288c17f17e709..2193c95638611ec5174751d4b8e5cb977654fe22 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-03  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR middle-end/30667
+       * gfortran.dg/pr30667.f: New test.
+
 2007-02-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * gcc.dg/builtins-54.c: Add more cases.
diff --git a/gcc/testsuite/gfortran.dg/pr30667.f b/gcc/testsuite/gfortran.dg/pr30667.f
new file mode 100644 (file)
index 0000000..0f1af29
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile { target i?86-*-* x86_64-*-* } }
+! { dg-require-effective-target ilp32 }
+! { dg-options "-O2 -msse -ftree-vectorize" }
+      subroutine cblank_cvb(a,ndim)
+      character*(*) a
+      character*1 blank
+      data blank/' '/
+      do 100 i=1,ndim
+100   a(i:i)=blank
+      end