}
for (const auto &[name, symbol] : *useModuleScope_) {
if (symbol->attrs().test(Attr::PUBLIC) &&
+ !symbol->attrs().test(Attr::INTRINSIC) &&
!symbol->detailsIf<MiscDetails>()) {
if (useNames.count(name) == 0) {
auto *localSymbol{FindInScope(currScope(), name)};
! type(t),parameter::a=t()
!end
-! Don't write out intrinsics
module m3a
integer, parameter :: i4 = selected_int_kind(9)
end
!Expect: m3b.mod
!module m3b
! use m3a,only:i4
-! use m3a,only:selected_int_kind
! integer(4)::j
!end
!Expect: m4b.mod
!module m4b
! use m4a,only:a
-! use m4a,only:achar
! character(1_4,1),parameter::b="\001"
!end
integer :: x
integer :: y
integer :: z
+ integer, parameter :: k1 = selected_int_kind(9)
end
module m2
real :: y
real :: z
real :: w
+ integer, parameter :: k2 = selected_int_kind(9)
end
-use m1, xx => x, y => z
-use m2
-volatile w
-!ERROR: Cannot change CONTIGUOUS attribute on use-associated 'w'
-contiguous w
-!ERROR: 'z' is use-associated from module 'm2' and cannot be re-declared
-integer z
-!ERROR: Reference to 'y' is ambiguous
-y = 1
+program p1
+ use m1
+ use m2
+ ! check that selected_int_kind is not use-associated
+ integer, parameter :: k = selected_int_kind(9)
+end
+
+program p2
+ use m1, xx => x, y => z
+ use m2
+ volatile w
+ !ERROR: Cannot change CONTIGUOUS attribute on use-associated 'w'
+ contiguous w
+ !ERROR: 'z' is use-associated from module 'm2' and cannot be re-declared
+ integer z
+ !ERROR: Reference to 'y' is ambiguous
+ y = 1
end