2016-02-28 Harald Anlauf <anlauf@gmx.de>
authordominiq <dominiq@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 28 Feb 2016 13:39:39 +0000 (13:39 +0000)
committerdominiq <dominiq@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 28 Feb 2016 13:39:39 +0000 (13:39 +0000)
PR fortran/60126
* gfortran.dg/pr60126.f90: New test.

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

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr60126.f90 [new file with mode: 0644]

index c809e2c..8953173 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-28  Harald Anlauf  <anlauf@gmx.de>
+
+       PR fortran/60126
+       * gfortran.dg/pr60126.f90: New test.
+
 2016-02-27  Jeff Law  <law@redhat.com>
 
        Revert
diff --git a/gcc/testsuite/gfortran.dg/pr60126.f90 b/gcc/testsuite/gfortran.dg/pr60126.f90
new file mode 100644 (file)
index 0000000..038f544
--- /dev/null
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! PR fortran/60126 - ICE on pointer rank remapping
+! Based on testcase by Michel Valin <mfvalin at gmail dot com>
+
+subroutine simple_bug_demo
+  implicit none
+  interface
+     function offset_ptr_R4(nelements) result (dest)
+       implicit none
+       real, pointer, dimension(:) :: dest
+       integer, intent(IN) :: nelements
+     end function offset_ptr_R4
+  end interface
+
+  real, dimension(:,:), pointer :: R2D
+
+  R2D(-2:2,-3:3) => offset_ptr_R4(100)
+end