aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-03-07 14:12:04 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-03-08 09:47:33 +0000
commit120525557a2dce8d4634456016a0d3943fcb8eb2 (patch)
tree4fe5ed0798b05eff3371d3dc06554c2930507a15 /gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90
parentf7cd0a49635b07f902e4ce8f5323b894f0baef20 (diff)
Merge branches/gcc-7-branch rev 258315 .
Change-Id: I651281d13f040cd2f9f911c460a26b61fe82b136
Diffstat (limited to 'gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_29.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90
new file mode 100644
index 00000000000..a9160660280
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+! PR fortran/81116
+! The assignment was broken due to a missing temporary.
+! Original test case by Clive Page.
+
+program test10
+ implicit none
+ character(:), allocatable :: string
+ !
+ string = '1234567890'
+ string = string(1:5) // string(7:)
+ if (string /= '123457890') STOP 1
+end program test10