re PR fortran/15324 (segfault / ICE with array of assumed length characters)
PR fortran/15324 * gfortran.dg/pr15324.f90: New test. From-SVN: r84754
This commit is contained in:
parent
9270f90074
commit
610bff8401
@ -1,3 +1,8 @@
|
||||
2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
PR fortran/15324
|
||||
* gfortran.dg/pr15324.f90: New test.
|
||||
|
||||
2004-07-14 Mike Stump <mrs@apple.com>
|
||||
|
||||
* gcc.dg/20020426-2.c: Improve type safety wrt unsignedness.
|
||||
|
22
gcc/testsuite/gfortran.dg/pr15324.f90
Normal file
22
gcc/testsuite/gfortran.dg/pr15324.f90
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user