view gcc/testsuite/gfortran.dg/namelist_32.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! One of two tests for the fix of PR23152 - An ICE would
! ensue from assumed shape arrays in namelists.
!
! Conributed by Paul Thomas  <pault@gcc.gnu.org>
!
program assumed_size_nml
  real, dimension (10) :: z
  z = 42.0
  call foo (z)
contains
  subroutine foo (y)
    real, DIMENSION (*) :: y
    namelist /mynml/ y     ! { dg-error "is not allowed" }
    write (6, mynml)
  end subroutine foo
end program assumed_size_nml