annotate gcc/testsuite/gfortran.dg/intrinsic_std_1.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-std=f95 -Wintrinsics-std" }
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! See intrinsic_std_6.f90 for the dump check.
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 ! PR fortran/33141
kono
parents:
diff changeset
9 ! Check for the expected behavior when an intrinsic function/subroutine is
kono
parents:
diff changeset
10 ! called that is not available in the defined standard or that is a GNU
kono
parents:
diff changeset
11 ! extension:
kono
parents:
diff changeset
12 ! There should be a warning emitted on the call, and the reference should be
kono
parents:
diff changeset
13 ! treated like an external call.
kono
parents:
diff changeset
14 ! For declaring a non-standard intrinsic INTRINSIC, a hard error should be
kono
parents:
diff changeset
15 ! generated, of course.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 SUBROUTINE no_implicit
kono
parents:
diff changeset
18 IMPLICIT NONE
kono
parents:
diff changeset
19 REAL :: asinh ! { dg-warning "Fortran 2008" }
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 ! abort is a GNU extension
kono
parents:
diff changeset
22 CALL abort () ! { dg-warning "extension" }
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 ! ASINH is an intrinsic of F2008
kono
parents:
diff changeset
25 ! The warning should be issued in the declaration above where it is declared
kono
parents:
diff changeset
26 ! EXTERNAL.
kono
parents:
diff changeset
27 WRITE (*,*) ASINH (1.) ! { dg-warning "Fortran 2008" }
kono
parents:
diff changeset
28 END SUBROUTINE no_implicit
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 SUBROUTINE implicit_type
kono
parents:
diff changeset
31 ! acosh has implicit type
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 WRITE (*,*) ACOSH (1.) ! { dg-warning "Fortran 2008" }
kono
parents:
diff changeset
34 WRITE (*,*) ACOSH (1.) ! { dg-bogus "Fortran 2008" }
kono
parents:
diff changeset
35 END SUBROUTINE implicit_type
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 SUBROUTINE specification_expression
kono
parents:
diff changeset
38 CHARACTER(KIND=selected_char_kind("ascii")) :: x
kono
parents:
diff changeset
39 ! { dg-error "must be an intrinsic function" "" { target "*-*-*" } .-1 }
kono
parents:
diff changeset
40 ! { dg-warning "Fortran 2003" "" { target "*-*-*" } .-2 }
kono
parents:
diff changeset
41 END SUBROUTINE specification_expression
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 SUBROUTINE intrinsic_decl
kono
parents:
diff changeset
44 IMPLICIT NONE
kono
parents:
diff changeset
45 INTRINSIC :: atanh ! { dg-error "Fortran 2008" }
kono
parents:
diff changeset
46 INTRINSIC :: abort ! { dg-error "extension" }
kono
parents:
diff changeset
47 END SUBROUTINE intrinsic_decl