PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / namelist_assumed_char.f90
blobb7d063c78b06bccd9f912faf35d53b85372240b4
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR30481 Assumed size character is not allowed in namelist.
5 ! Test case from PR, submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
7 ! Modifications for PR fortran/47339 / PR fortran/43062:
8 ! Add -std=f95, add bar()
10 subroutine foo(c)
11 character*(*) c
12 namelist /abc/ c ! { dg-error "nonconstant character length in namelist" }
13 end subroutine
15 subroutine bar(d,n)
16 integer :: n
17 character(len=n) d
18 namelist /abcd/ d ! { dg-error "nonconstant character length in namelist" }
19 end subroutine bar