1! { dg-do compile } 2! PR31306 ICE with implicit character variables 3! Test case from PR and prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org> 4module cyclic 5 implicit none 6 contains 7 function ouch(x,y) ! { dg-error "has no IMPLICIT type" } 8 implicit character(len(ouch)) (x) ! { dg-error "used before it is typed" } 9 implicit character(len(x)+1) (y) ! { dg-error "used before it is typed" } 10 implicit character(len(y)-1) (o) ! { dg-error "used before it is typed" } 11 intent(in) x,y 12 character(len(y)-1) ouch ! { dg-error "used before it is typed" } 13 integer i 14 do i = 1, len(ouch) 15 ouch(i:i) = achar(ieor(iachar(x(i:i)),iachar(y(i:i)))) ! { dg-error "Unclassifiable statement" } 16 end do 17 end function ouch 18end module cyclic 19