view gcc/testsuite/gfortran.dg/intrinsic_size_4.f90 @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! Test the fix for PR55362; the error below was missed and an ICE ensued.
!
! ! Contributed by Dominique d'Humieres  <dominiq@lps.ens.fr>
!
program ice_test
  implicit none
  write(*,*) 'message: ', &
             size(Error_Msg),Error_Msg()     ! { dg-error "must be an array" }
  write(*,*) 'message: ', &
             size(Error_Msg ()),Error_Msg()  ! OK of course
contains
  function Error_Msg() result(ErrorMsg)
    character, dimension(:), pointer :: ErrorMsg
    character, dimension(1), target :: str = '!'
    ErrorMsg => str
  end function Error_Msg
end program ice_test