2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic_size_4.f90
blob6d8e1c0b587e7a14825066c2bfa537aa0ee05fc2
1 ! { dg-do compile }
2 ! Test the fix for PR55362; the error below was missed and an ICE ensued.
4 ! ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
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