summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pointer_to_substring.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pointer_to_substring.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_to_substring.f9010
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pointer_to_substring.f90 b/gcc/testsuite/gfortran.dg/pointer_to_substring.f90
new file mode 100644
index 000000000..054a29d56
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_to_substring.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR36724 - ICE on pointer to substring
+! testcase contributed by Loukas Peristeras.
+
+ character(LEN=132), target :: line
+ character(LEN=1), pointer :: t
+
+ read(*,'(A)') line
+ t=>line(1:1)
+end