diff --git a/flang/lib/Semantics/type.cpp b/flang/lib/Semantics/type.cpp index bc8667e43f107..afc2baaaeedef 100644 --- a/flang/lib/Semantics/type.cpp +++ b/flang/lib/Semantics/type.cpp @@ -368,7 +368,6 @@ void DerivedTypeSpec::Instantiate(Scope &containingScope) { } // Instantiate every non-parameter symbol from the original derived // type's scope into the new instance. - newScope.AddSourceRange(typeScope.sourceRange()); auto restorer2{foldingContext.messages().SetContext(contextMessage)}; if (PlumbPDTInstantiationDepth(&containingScope) > 100) { foldingContext.messages().Say(