gcc/testsuite/gfortran.dg/deferred_character_35.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! |
| 3 | ! Test the fix for PR93794, where the ASSOCIATE statement ICED on the |
| 4 | ! deferred character length, pointer component. |
| 5 | ! |
| 6 | ! Contributed by Gerhard Steinmetz <[email protected]> |
| 7 | ! |
| 8 | program p |
| 9 | type t |
| 10 | character(:), pointer :: a |
| 11 | end type |
| 12 | type(t) :: z |
| 13 | character(4), target :: c = 'abcd' |
| 14 | z%a => c |
| 15 | associate (y => z%a) |
| 16 | print *, y |
| 17 | end associate |
| 18 | end |