aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/namelist_31.f90
blob: b7aba98b4b396ac260735001d780e8b9f93af07b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! One of two tests for the fix of PR23152 - There used to be
! no warning for assumed shape arrays in namelists.
!
! Conributed by Paul Thomas  <pault@gcc.gnu.org>
!
program assumed_shape_nml
  real, dimension (10) :: z
  z = 42.0
  call foo (z)
contains
  subroutine foo (y)
    real, DIMENSION (:) :: y
    namelist /mynml/ y
    write (*, mynml)
  end subroutine foo
end program assumed_shape_nml