File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3359,7 +3359,8 @@ bool ScopeHandler::CheckPossibleBadForwardRef(const Symbol &symbol) {
3359
3359
context ().SetError (symbol);
3360
3360
return true ;
3361
3361
}
3362
- if ((IsDummy (symbol) || FindCommonBlockContaining (symbol)) &&
3362
+ if ((IsDummy (symbol) ||
3363
+ (!symbol.has <UseDetails>() && FindCommonBlockContaining (symbol))) &&
3363
3364
isImplicitNoneType () && symbol.test (Symbol::Flag::Implicit) &&
3364
3365
!context ().HasError (symbol)) {
3365
3366
// Dummy or COMMON was implicitly typed despite IMPLICIT NONE(TYPE) in
Original file line number Diff line number Diff line change
1
+ ! RUN: %flang_fc1 -fsyntax-only -pedantic %s 2>&1 | FileCheck %s --allow-empty
2
+ ! Ensure no bogus "no explicit type for ..." error on USE-associated
3
+ ! implicitly-typed COMMON block object in scope with IMPLICIT NONE.
4
+ ! CHECK-NOT: error:
5
+ module m
6
+ common / block/ var
7
+ end
8
+ subroutine test
9
+ use m
10
+ implicit none
11
+ end
You can’t perform that action at this time.
0 commit comments