| 1 |
! { dg-do compile } |
| 2 |
! Test the fix for PR55362; the error below was missed and an ICE ensued. |
| 3 |
! |
| 4 |
! ! Contributed by Dominique d'Humieres <[email protected]> |
| 5 |
! |
| 6 |
program ice_test |
| 7 |
implicit none |
| 8 |
write(*,*) 'message: ', & |
| 9 |
size(Error_Msg),Error_Msg() ! { dg-error "must be an array" } |
| 10 |
write(*,*) 'message: ', & |
| 11 |
size(Error_Msg ()),Error_Msg() ! OK of course |
| 12 |
contains |
| 13 |
function Error_Msg() result(ErrorMsg) |
| 14 |
character, dimension(:), pointer :: ErrorMsg |
| 15 |
character, dimension(1), target :: str = '!' |
| 16 |
ErrorMsg => str |
| 17 |
end function Error_Msg |
| 18 |
end program ice_test |