PR 94347 - add a test case for something a PR has fixed itself.
authorThomas König <tkoenig@gcc.gnu.org>
Sun, 19 Apr 2020 12:05:46 +0000 (14:05 +0200)
committerThomas König <tkoenig@gcc.gnu.org>
Sun, 19 Apr 2020 12:05:46 +0000 (14:05 +0200)
2020-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/94347
* gfortran.dg/char_pointer_init_1.f90: New test.

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

index 315a29b..122c737 100644 (file)
@@ -1,5 +1,10 @@
 2020-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
+       PR fortran/94347
+       * gfortran.dg/char_pointer_init_1.f90: New test.
+
+2020-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
        PR fortran/57129
        * gfortran.dg/subroutine_as_type.f90: New test.
 
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_12.f90 b/gcc/testsuite/gfortran.dg/pointer_init_12.f90
new file mode 100644 (file)
index 0000000..b2bce01
--- /dev/null
@@ -0,0 +1,8 @@
+! { dg-do compile }
+! PR 94347 - this used to cause an ICE.
+! Original test case by "Serghei".
+program main
+    character(10), target :: a
+    character(:), pointer :: p => null()
+    p => a
+end program main