PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / argument_checking_7.f90
blob0bf76cbb4516e4497fa566eba3e209b42032684d
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>
4 module 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
18 end module cyclic