PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / use_without_only_1.f90
blob06af985393341fbfd8dab4c88c31698b49f42776
1 ! PR fortran/61234 Warn for use-stmt without explicit only-list.
2 ! { dg-do compile }
3 ! { dg-options "-Wuse-without-only" }
4 MODULE foo
5 INTEGER :: bar
6 END MODULE
8 MODULE testmod
9 USE foo ! { dg-warning "6:has no ONLY qualifier" }
10 IMPLICIT NONE
11 CONTAINS
12 SUBROUTINE S1
13 USE foo ! { dg-warning "9:has no ONLY qualifier" }
14 END SUBROUTINE S1
15 SUBROUTINE S2
16 USE foo, ONLY: bar
17 END SUBROUTINE
18 SUBROUTINE S3
19 USE ISO_C_BINDING ! { dg-warning "9:has no ONLY qualifier" }
20 END SUBROUTINE S3
21 END MODULE