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) {
33593359 context ().SetError (symbol);
33603360 return true ;
33613361 }
3362- if ((IsDummy (symbol) || FindCommonBlockContaining (symbol)) &&
3362+ if ((IsDummy (symbol) ||
3363+ (!symbol.has <UseDetails>() && FindCommonBlockContaining (symbol))) &&
33633364 isImplicitNoneType () && symbol.test (Symbol::Flag::Implicit) &&
33643365 !context ().HasError (symbol)) {
33653366 // 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