gcc/testsuite/gfortran.dg/pr99350.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! Contributed by Gerhard Steinmetz <[email protected]> |
| 4 | ! |
| 5 | program p |
| 6 | type t |
| 7 | character(:), pointer :: a |
| 8 | end type |
| 9 | type(t) :: z |
| 10 | character((0.)/0), target :: c = 'abc' ! { dg-error "Arithmetic NaN" } |
| 11 | z%a => c |
| 12 | ! The associate statement was not needed to trigger the ICE. |
| 13 | associate (y => z%a) |
| 14 | print *, y |
| 15 | end associate |
| 16 | end |