OSDN Git Service

PR debug/43972
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 May 2010 15:42:43 +0000 (15:42 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:37:51 +0000 (14:37 +0900)
* config/i386/i386.c (ix86_delegitimize_address): Make sure the
result mode matches original rtl mode.

* gcc.dg/debug/pr43972.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158989 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog

index 3390fae..e62e9ab 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/43972
+       * config/i386/i386.c (ix86_delegitimize_address): Make sure the
+       result mode matches original rtl mode.
+
 2010-05-03  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/43888
index 10aac6e..e05d3cc 100644 (file)
@@ -11014,7 +11014,10 @@ ix86_delegitimize_address (rtx x)
          || XINT (XEXP (x, 0), 1) != UNSPEC_GOTPCREL
          || !MEM_P (orig_x))
        return orig_x;
-      return XVECEXP (XEXP (x, 0), 0, 0);
+      x = XVECEXP (XEXP (x, 0), 0, 0);
+      if (GET_MODE (orig_x) != Pmode)
+       return simplify_gen_subreg (GET_MODE (orig_x), x, Pmode, 0);
+      return x;
     }
 
   if (GET_CODE (x) != PLUS
@@ -11081,6 +11084,8 @@ ix86_delegitimize_address (rtx x)
       else
        return orig_x;
     }
+  if (GET_MODE (orig_x) != Pmode && MEM_P (orig_x))
+    return simplify_gen_subreg (GET_MODE (orig_x), result, Pmode, 0);
   return result;
 }
 
index e52a545..0ddc435 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-03  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/43972
+       * gcc.dg/debug/pr43972.c: New test.
+
 2010-05-02  Uros Bizjak  <ubizjak@gmail.com>
 
        PR testsuite/43963