fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic.f90
blobe3ac35ef52a6073c27cdf75d07c52a7be54f6e4c
1 ! { dg-do compile }
2 ! { dg-options "-c -Wall" }
4 ! PR fortran/20373
5 ! cf. also PR fortran/40041
7 subroutine valid
8 intrinsic :: abs ! ok, intrinsic function
9 intrinsic :: cpu_time ! ok, intrinsic subroutine
10 end subroutine
12 subroutine warnings
13 ! the follow three are ok in general, but ANY
14 ! type is ignored, even the correct one
15 real, intrinsic :: sin ! { dg-warning "is ignored" }
17 real :: asin ! { dg-warning "is ignored" }
18 intrinsic :: asin
20 intrinsic :: tan ! { dg-warning "is ignored" }
21 real :: tan
23 ! wrong types here
24 integer, intrinsic :: cos ! { dg-warning "is ignored" }
26 integer :: acos ! { dg-warning "is ignored" }
27 intrinsic :: acos
29 ! ordering shall not matter
30 intrinsic :: atan ! { dg-warning "is ignored" }
31 integer :: atan
32 end subroutine
34 subroutine errors
35 intrinsic :: foo ! { dg-error "does not exist" }
36 real, intrinsic :: bar ! { dg-error "does not exist" }
38 real, intrinsic :: mvbits ! { dg-error "shall not have a type" }
39 end subroutine