| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-ffrontend-optimize" } |
| 3 |
! PR 90344 - this used to ICE. |
| 4 |
! Test case by Urban Jost. |
| 5 |
module M_xterm |
| 6 |
contains |
| 7 |
elemental function func1(ch) result(res) |
| 8 |
character,intent(in) :: ch |
| 9 |
logical :: res |
| 10 |
res=.true. |
| 11 |
end function func1 |
| 12 |
elemental function func2(ch) result(res) |
| 13 |
character,intent(in) :: ch |
| 14 |
logical :: res |
| 15 |
res=.false. |
| 16 |
end function func2 |
| 17 |
pure function s2a(string) RESULT (array) |
| 18 |
character(len=*),intent(in) :: string |
| 19 |
character(len=1) :: array(len(string)) |
| 20 |
forall(i=1:len(string)) array(i) = string(i:i) |
| 21 |
end function s2a |
| 22 |
subroutine sub1() |
| 23 |
write(*,*)all(func1(s2a('ABCDEFG')).or.func2(s2a('ABCDEFG'))) |
| 24 |
end subroutine sub1 |
| 25 |
end module M_xterm |