view gcc/testsuite/gfortran.dg/constant_shape.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do compile }
!
! PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979
!
! Contributed by Janus Weil <janus@gcc.gnu.org>
! Error message update with patch for PR fortran/83633
!
module mytypes
   implicit none
 contains
   pure integer function get_i ()
     get_i = 13
   end function
end module

program test
  use mytypes
  implicit none
  integer, dimension(get_i()) :: x  ! { dg-error "array with nonconstant bounds" }
  print *, size (x)                 ! { dg-error "has no IMPLICIT type" }
end