File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -619,20 +619,18 @@ void Symbol::resolve(Ctx &ctx, const LazySymbol &other) {
619619 return ;
620620 }
621621
622- // For common objects, we want to look for global or weak definitions that
623- // should be extracted as the canonical definition instead.
624- if (LLVM_UNLIKELY (isCommon ()) && ctx.arg .fortranCommon &&
625- other.file ->shouldExtractForCommon (getName ())) {
626- ctx.backwardReferences .erase (this );
627- other.overwrite (*this );
628- other.extract (ctx);
629- return ;
630- }
631-
632- if (!isUndefined ()) {
633- // See the comment in resolveUndefined().
634- if (isDefined ())
622+ if (LLVM_UNLIKELY (!isUndefined ())) {
623+ // See the comment in resolve(Ctx &, const Undefined &).
624+ if (isDefined ()) {
625+ ctx.backwardReferences .erase (this );
626+ } else if (isCommon () && ctx.arg .fortranCommon &&
627+ other.file ->shouldExtractForCommon (getName ())) {
628+ // For common objects, we want to look for global or weak definitions that
629+ // should be extracted as the canonical definition instead.
635630 ctx.backwardReferences .erase (this );
631+ other.overwrite (*this );
632+ other.extract (ctx);
633+ }
636634 return ;
637635 }
638636
You can’t perform that action at this time.
0 commit comments