2008-07-06 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic.f90
blob8bb41fdfdc42a2a6a617520a897a221a393a3446
1 ! { dg-do compile }
2 ! { dg-options "-c -Wall" }
4 subroutine valid
5 intrinsic :: abs ! ok, intrinsic function
6 intrinsic :: cpu_time ! ok, intrinsic subroutine
7 end subroutine
9 subroutine warnings
10 ! the follow three are ok in general, but ANY
11 ! type is ignored, even the correct one
12 real, intrinsic :: sin ! { dg-warning "is ignored" }
14 real :: asin ! { dg-warning "is ignored" }
15 intrinsic :: asin
17 intrinsic :: tan ! { dg-warning "is ignored" }
18 real :: tan
20 ! wrong types here
21 integer, intrinsic :: cos ! { dg-warning "is ignored" }
23 integer :: acos ! { dg-warning "is ignored" }
24 intrinsic :: acos
26 ! ordering shall not matter
27 intrinsic :: atan ! { dg-warning "is ignored" }
28 integer :: atan
29 end subroutine
31 subroutine errors
32 intrinsic :: foo ! { dg-error "does not exist" }
33 real, intrinsic :: bar ! { dg-error "does not exist" }
35 real, intrinsic :: mvbits ! { dg-error "shall not have a type" }
36 end subroutine