@@ -2950,7 +2950,7 @@ static bool IsSubprogramDefinition(const Symbol &symbol) {
29502950
29512951static bool IsExternalProcedureDefinition (const Symbol &symbol) {
29522952 return IsBlockData (symbol) ||
2953- (IsSubprogramDefinition (symbol) &&
2953+ (( IsSubprogramDefinition (symbol) || IsAlternateEntry (symbol) ) &&
29542954 (IsExternal (symbol) || symbol.GetBindName ()));
29552955}
29562956
@@ -2997,12 +2997,9 @@ void CheckHelper::CheckGlobalName(const Symbol &symbol) {
29972997 // they're not in the same scope.
29982998 } else if ((IsProcedure (symbol) || IsBlockData (symbol)) &&
29992999 (IsProcedure (other) || IsBlockData (other)) &&
3000- (!(IsExternalProcedureDefinition (symbol) || GetMainEntry (&symbol)) ||
3001- !(IsExternalProcedureDefinition (other) ||
3002- GetMainEntry (&other)))) {
3003- // Both are procedures/BLOCK DATA, not both definitions.
3004- // Note: GetMainEntry() above returns non-null in case symbol
3005- // is an alternate entry.
3000+ (!IsExternalProcedureDefinition (symbol) ||
3001+ !IsExternalProcedureDefinition (other))) {
3002+ // both are procedures/BLOCK DATA, not both definitions
30063003 } else if (IsSameSymbolFromHermeticModule (symbol, other)) {
30073004 // Both symbols are the same thing.
30083005 } else if (symbol.has <ModuleDetails>()) {
0 commit comments