diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/substr_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/substr_1.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/substr_1.f90 b/gcc/testsuite/gfortran.dg/substr_1.f90 new file mode 100644 index 00000000000..15ab390f906 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/substr_1.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! we used to save the wrong components of a gfc_expr describing a +! substring of a constant string. This yielded a segfault on +! translating the expressions read from the module. +module m + character (*), parameter :: a = "AABBCC"(1:4) +end module m + +use m +character(4) :: b +b = a +end + |