gcc/testsuite/gfortran.dg/pr91471.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! PR fortran/91471 |
| 3 | ! Code contributed by Sameeran Joshi <SameeranJayant dot Joshi at amd dot com> |
| 4 | ! |
| 5 | ! This invalid code (x(1) is referenced, but never set) caused an ICE due |
| 6 | ! to hitting a gfc_internal_error() in primary.c (gfc_variable_attr). The |
| 7 | ! fix is to remove that gfc_internal_error(). |
| 8 | ! |
| 9 | program dynamic |
| 10 | implicit none |
| 11 | integer, dimension(:), allocatable :: x |
| 12 | allocate(x(1)) |
| 13 | stop x(1) |
| 14 | end program dynamic |