view gcc/testsuite/gfortran.dg/pr91471.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900 (2020-05-25)
parents 1830386684a0
children
line wrap: on
line source
! { dg-do compile }
! PR fortran/91471
! Code contributed by Sameeran Joshi <SameeranJayant dot Joshi at amd dot com>
!
! This invalid code (x(1) is referenced, but never set) caused an ICE due
! to hitting a gfc_internal_error() in primary.c (gfc_variable_attr).  The
! fix is to remove that gfc_internal_error().
! 
program dynamic
   implicit none
   integer, dimension(:), allocatable :: x
   allocate(x(1))
   stop x(1)
end program dynamic