2 ! { dg-options "-std=f95 -Wintrinsics-std -fdump-tree-original" }
5 ! See intrinsic_std_1.f90 for more compile-time checks
9 ! Check for the expected behaviour when an intrinsic function/subroutine is
10 ! called that is not available in the defined standard or that is a GNU
12 ! There should be a warning emitted on the call, and the reference should be
13 ! treated like an external call.
14 ! For declaring a non-standard intrinsic INTRINSIC, a hard error should be
15 ! generated, of course.
17 SUBROUTINE no_implicit
19 REAL :: asinh
! { dg-warning "Fortran 2008" }
21 ! abort is a GNU extension
22 CALL abort () ! { dg-warning "extension" }
24 ! ASINH is an intrinsic of F2008
25 ! The warning should be issued in the declaration above where it is declared
27 WRITE (*,*) ASINH (1.) ! { dg-warning "Fortran 2008" }
28 END SUBROUTINE no_implicit
30 SUBROUTINE implicit_type
31 ! acosh has implicit type
33 WRITE (*,*) ACOSH (1.) ! { dg-warning "Fortran 2008" }
34 WRITE (*,*) ACOSH (1.) ! { dg-bogus "Fortran 2008" }
35 END SUBROUTINE implicit_type
37 ! Scan that really external functions are called.
38 ! { dg-final { scan-tree-dump " abort " "original" } }
39 ! { dg-final { scan-tree-dump " asinh " "original" } }
40 ! { dg-final { scan-tree-dump " acosh " "original" } }
41 ! { dg-final { cleanup-tree-dump "original" } }