File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -449,11 +449,13 @@ class FirConverter : public Fortran::lower::AbstractConverter {
449
449
450
450
void copySymbolBinding (Fortran::lower::SymbolRef src,
451
451
Fortran::lower::SymbolRef target) override final {
452
- if (bridge.getLoweringOptions ().getLowerToHighLevelFIR ())
453
- localSymbols.addVariableDefinition (
454
- target, localSymbols.lookupVariableDefinition (src).value ());
455
- else
452
+ if (bridge.getLoweringOptions ().getLowerToHighLevelFIR ()) {
453
+ auto srcDef = localSymbols.lookupVariableDefinition (src);
454
+ assert (srcDef && " source binding does not exists" );
455
+ localSymbols.addVariableDefinition (target, *srcDef);
456
+ } else {
456
457
localSymbols.addSymbol (target, lookupSymbol (src).toExtendedValue ());
458
+ }
457
459
}
458
460
459
461
// / Add the symbol binding to the inner-most level of the symbol map and
You can’t perform that action at this time.
0 commit comments