From 63f9a2026b295fdbd0fab8a436b950c09c122110 Mon Sep 17 00:00:00 2001 From: tobi Date: Thu, 15 Jul 2004 14:59:15 +0000 Subject: [PATCH] PR fortran/15324 * gfortran.dg/pr15324.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84754 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr15324.f90 | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr15324.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5d763cc..69cd43e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-07-15 Tobias Schlueter + + PR fortran/15324 + * gfortran.dg/pr15324.f90: New test. + 2004-07-14 Mike Stump * gcc.dg/20020426-2.c: Improve type safety wrt unsignedness. diff --git a/gcc/testsuite/gfortran.dg/pr15324.f90 b/gcc/testsuite/gfortran.dg/pr15324.f90 new file mode 100644 index 0000000..ce534633 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr15324.f90 @@ -0,0 +1,22 @@ +! { dg-do run } +! PR 15234 +! tests for passing arrays of assumed length characters +program strarray_6 +character(5), dimension(:), allocatable :: c +n = 3 +allocate(c(-1:n-1)) +c = "BLUBB" +call foo(c) +call bar(c,n) +deallocate(c) +contains +subroutine foo(x) + character (len = *), dimension(:) :: x + if (any (x .ne. "BLUBB")) CALL abort() +end subroutine foo +end + +subroutine bar(x,n) + character (len = *), dimension(n) :: x + if (any (x .ne. "BLUBB")) CALL abort() +end subroutine bar -- 2.7.4