]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/47008 (gfortran.dg/extends_{23}.f03 FAIL with -Os -fschedule...
authorJakub Jelinek <jakub@redhat.com>
Tue, 21 Dec 2010 14:51:42 +0000 (15:51 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 21 Dec 2010 14:51:42 +0000 (15:51 +0100)
PR rtl-optimization/47008
* postreload.c (reload_combine_note_store): Also handle
PRE_MODIFY and POST_MODIFY.

* gfortran.dg/pr47008.f03: New test.

From-SVN: r168117

gcc/ChangeLog
gcc/postreload.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr47008.f03 [new file with mode: 0644]

index 14d973b66a576d5e42e0fd77bd8caad76f1227ae..2b47e8e3f40b66e901b32a79907fea87d547102a 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/47008
+       * postreload.c (reload_combine_note_store): Also handle
+       PRE_MODIFY and POST_MODIFY.
+
 2010-12-21  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
 
        * config/arm/arm.c (require_pic_register): Set INSN_LOCATOR for all
index 97e8b4a7ed0fef59eca6d1e55ff8a5cc5c34a816..15c22e28e07720b74965ddbe267b3430cecdc0d1 100644 (file)
@@ -1415,7 +1415,8 @@ reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED)
     {
       dst = XEXP (dst, 0);
       if (GET_CODE (dst) == PRE_INC || GET_CODE (dst) == POST_INC
-         || GET_CODE (dst) == PRE_DEC || GET_CODE (dst) == POST_DEC)
+         || GET_CODE (dst) == PRE_DEC || GET_CODE (dst) == POST_DEC
+         || GET_CODE (dst) == PRE_MODIFY || GET_CODE (dst) == POST_MODIFY)
        {
          regno = REGNO (XEXP (dst, 0));
          mode = GET_MODE (XEXP (dst, 0));
index 50cfa32e38c4bf061141019e854bd0ad62607f2a..3a66f1c15d3991d8012ffac42e6a32eabc813317 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-21  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/47008
+       * gfortran.dg/pr47008.f03: New test.
+
 2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        PR libobjc/45953
diff --git a/gcc/testsuite/gfortran.dg/pr47008.f03 b/gcc/testsuite/gfortran.dg/pr47008.f03
new file mode 100644 (file)
index 0000000..a3e1e1d
--- /dev/null
@@ -0,0 +1,24 @@
+! PR rtl-optimization/47008
+! { dg-do run }
+! { dg-options "-Os -fno-asynchronous-unwind-tables -fschedule-insns -fsched-pressure -fno-inline" { target i?86-*-* x86_64-*-* } }
+
+program main
+  type :: t
+    integer :: i
+    character(24) :: c
+    type (t), pointer :: p
+  end type t
+  type(t), pointer :: r, p
+  allocate (p)
+  p = t (123455, "", p)
+  r => entry ("", 123456, 1, "", 99, "", p)
+  if (p%i /= 123455) call abort
+contains
+  function entry (x, i, j, c, k, d, p) result (q)
+    integer :: i, j, k
+    character (*) :: x, c, d
+    type (t), pointer :: p, q
+    allocate (q)
+    q = t (i, c, p)
+  end function
+end program main