diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/realloc_on_assign_29.f90 | 13 |
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 |