]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/60126 (Internal compiler error with code using pointer reshaping (gfort...
authorHarald Anlauf <anlauf@gmx.de>
Mon, 29 Feb 2016 06:09:47 +0000 (06:09 +0000)
committerDominique d'Humieres <dominiq@gcc.gnu.org>
Mon, 29 Feb 2016 06:09:47 +0000 (07:09 +0100)
2016-02-29  Harald Anlauf  <anlauf@gmx.de>

PR fortran/60126
* gfortran.dg/pr60126.f90: New test.

From-SVN: r233802

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

index 7d4b1de71869881d85b115135d39e623d25622ec..cfdf7c3d4ad049831e2ef3dd994b75b194f76913 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-29  Harald Anlauf  <anlauf@gmx.de>
+
+       PR fortran/60126
+       * gfortran.dg/pr60126.f90: New test.
+
 2016-02-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        Backport from mainline
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