]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/54166 (ICE rank-1 assignment to rank-2 array section)
authorMikael Morin <mikael@gcc.gnu.org>
Fri, 3 Aug 2012 16:00:50 +0000 (16:00 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Fri, 3 Aug 2012 16:00:50 +0000 (16:00 +0000)
fortran/
PR fortran/54166
* trans-array.c (set_loop_bounds): Access specinfo using spec_dim.

testsuite/
PR fortran/54166
* gfortran.dg/array_5.f90: New test.

From-SVN: r190130

gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/array_5.f90 [new file with mode: 0644]

index 90442800d545edcbf3da0d6ced2ef098bf288bbf..fef8abad3ce629b2f3ad992b5926f3ecc90ea361 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-03  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/54166
+       * trans-array.c (set_loop_bounds): Access specinfo using spec_dim.
+
 2012-08-02  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/48820
index 187eab01b008171a3ed62e2e819cca963438a488..ef25a36f107f954940dcd37bbc7e18efd659f03d 100644 (file)
@@ -4503,9 +4503,9 @@ set_loop_bounds (gfc_loopinfo *loop)
          else if (INTEGER_CST_P (info->start[dim])
                   && !INTEGER_CST_P (specinfo->start[spec_dim])
                   && integer_onep (info->stride[dim])
-                     == integer_onep (specinfo->stride[dim])
+                     == integer_onep (specinfo->stride[spec_dim])
                   && INTEGER_CST_P (info->stride[dim])
-                     == INTEGER_CST_P (specinfo->stride[dim]))
+                     == INTEGER_CST_P (specinfo->stride[spec_dim]))
            loopspec[n] = ss;
          /* We don't work out the upper bound.
             else if (INTEGER_CST_P (info->finish[n])
index b7486f97c2828c6123ee8c3b053ee27b1c78ed94..448dc5dc428ddb67b7e34bc02d510b6a16e3634b 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-03  Mikael Morin  <mikael@gcc.gnu.org>
+
+       PR fortran/54166
+       * gfortran.dg/array_5.f90: New test.
+
 2012-08-03 Marc Glisse <marc.glisse@inria.fr>
 
        PR tree-optimization/30318
diff --git a/gcc/testsuite/gfortran.dg/array_5.f90 b/gcc/testsuite/gfortran.dg/array_5.f90
new file mode 100644 (file)
index 0000000..82ab243
--- /dev/null
@@ -0,0 +1,24 @@
+! { dg-do compile }
+! 
+! PR fortran/54166
+! There was an ICE while chosing the bounds to scalarize the FAIL line.
+!
+! Contributed by Koen Poppe <koen.poppe@cs.kuleuven.be>
+!
+
+module ds_routines
+contains
+    subroutine dsget(vertic,rstore)
+        real, dimension(:), intent(in out) :: rstore
+        real, dimension(:,:), intent(out) :: vertic
+        integer :: nrvert,point
+        nrvert = 4
+        point = 26
+        vertic(1,1:nrvert) = rstore(point+1:point+nrvert) ! FAIL
+    end subroutine dsget
+end module ds_routines
+
+program ds_routines_program
+    use ds_routines
+    print *, "ok"
+end program ds_routines_program
This page took 0.101517 seconds and 5 git commands to generate.