[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gfortran.dg / intrinsic_2.f90
blobb4919a13cde7b80bda66625b44b6c9159b04ae98
1 ! { dg-do compile }
2 ! { dg-options "-c -Wall" }
4 ! PR fortran/40041
5 ! cf. also PR fortran/20373
7 subroutine valid_one
8 REAL :: a
9 INTEGER :: n
10 INTRINSIC ABS, MAX
11 a(n) = MAX(ABS(2),ABS(3),n)
12 end subroutine
14 subroutine valid_two
15 IMPLICIT NONE
16 REAL :: a
17 INTEGER :: n
18 INTRINSIC ABS, MAX
19 a(n) = MAX(ABS(2),ABS(3),n)
20 end subroutine
22 subroutine warnings_one
23 REAL :: a
24 INTEGER :: n
25 REAL :: ABS ! { dg-warning "Type specified for intrinsic function" }
26 REAL :: MAX ! { dg-warning "Type specified for intrinsic function" }
27 INTRINSIC ABS, MAX
28 a(n) = MAX(ABS(2),ABS(3),n)
29 end subroutine
31 subroutine warnings_two
32 IMPLICIT NONE
33 REAL :: a
34 INTEGER :: n
35 INTRINSIC ABS ! { dg-warning "Type specified for intrinsic function" }
36 INTRINSIC MAX ! { dg-warning "Type specified for intrinsic function" }
37 REAL :: ABS
38 REAL :: MAX
39 a(n) = MAX(ABS(2),ABS(3),n)
40 end subroutine