diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr15140.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr15140.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr15140.f90 b/gcc/testsuite/gfortran.dg/pr15140.f90 new file mode 100644 index 000000000..0f566dcd1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr15140.f90 @@ -0,0 +1,13 @@ +! { dg-do run } +! PR 15140: we used to fail an assertion, because we don't use the +! argument of the subroutine directly, but instead use a copy of it. +function M(NAMES) + CHARACTER*(*) NAMES(*) + if (any(names(1:2).ne."asdfg")) call abort + m = LEN(NAMES(1)) +END function M + +character(5) :: c(2) +c = "asdfg" +if(m(c).ne.5) call abort() +end |