view gcc/testsuite/gfortran.dg/pr64107.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 84e7813d76e9
children
line wrap: on
line source

! { dg-do compile }
! PR fortran/64107
! Code contribute by  fxcoudert at gcc dot gnu dot org
! Appears to be fixed by patch for PR fortran/83633
module m1

contains
  pure integer function foo()
    foo = 2
  end function
end module

subroutine test
  use m1
  integer :: x1(foo())
end subroutine

module m
  use m1
  integer :: x2(foo())     ! { dg-error "array with nonconstant bounds" }
contains
  subroutine sub
    integer :: x3(foo())
  end subroutine
end module

program p
  use m1
  integer :: x4(foo())     ! { dg-error "array with nonconstant bounds" }
end program