1! { dg-do compile }
2! { dg-options "-c -Wall" }
3!
4! PR fortran/20373
5! cf. also PR fortran/40041
6
7subroutine valid
8  intrinsic :: abs                 ! ok, intrinsic function
9  intrinsic :: cpu_time            ! ok, intrinsic subroutine
10end subroutine
11
12subroutine 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" }
16
17  real :: asin                     ! { dg-warning "is ignored" }
18  intrinsic :: asin
19
20  intrinsic :: tan                 ! { dg-warning "is ignored" }
21  real :: tan
22
23  ! wrong types here
24  integer, intrinsic :: cos        ! { dg-warning "is ignored" }
25
26  integer :: acos                  ! { dg-warning "is ignored" }
27  intrinsic :: acos
28
29  ! ordering shall not matter
30  intrinsic :: atan                ! { dg-warning "is ignored" }
31  integer :: atan
32end subroutine
33
34subroutine errors
35  intrinsic :: foo                 ! { dg-error "does not exist" }
36  real, intrinsic :: bar           ! { dg-error "does not exist" }
37
38  real, intrinsic :: mvbits        ! { dg-error "shall not have a type" }
39end subroutine
40