2 ! { dg-options "-std=f2003 -Wintrinsic-shadow" }
5 ! Check that the expected warnings are emitted if a user-procedure has the same
6 ! name as an intrinsic, but only if it is matched by the current -std=*.
13 ! ASIN is an intrinsic
14 REAL FUNCTION asin (arg) ! { dg-warning "shadow the intrinsic" }
19 ! ASINH is one but not in F2003
20 REAL FUNCTION asinh (arg) ! { dg-bogus "shadow the intrinsic" }
27 ! ACOS is an intrinsic
28 REAL FUNCTION acos (arg) ! { dg-warning "of an intrinsic" }
34 REAL FUNCTION acosh (arg) ! { dg-bogus "of an intrinsic" }
39 ! A subroutine with the same name as an intrinsic subroutine
40 SUBROUTINE random_number (arg) ! { dg-warning "of an intrinsic" }
42 REAL, INTENT(OUT) :: arg
43 END SUBROUTINE random_number
45 ! But a subroutine with the name of an intrinsic function is ok.
46 SUBROUTINE atan (arg) ! { dg-bogus "of an intrinsic" }
51 ! As should be a function with the name of an intrinsic subroutine.
52 REAL FUNCTION random_seed () ! { dg-bogus "of an intrinsic" }
53 END FUNCTION random_seed
55 ! We do only compile, so no main program needed.
57 ! { dg-final { cleanup-modules "testmod" } }