forked from OSchip/llvm-project
[flang] Fix bug
Original-commit: flang-compiler/f18@662b8139b5 Reviewed-on: https://github.com/flang-compiler/f18/pull/926 Tree-same-pre-rewrite: false
This commit is contained in:
parent
c2bdc144c5
commit
7010fff8de
|
@ -2801,7 +2801,12 @@ void SubprogramVisitor::PushBlockDataScope(const parser::Name &name) {
|
|||
EraseSymbol(name);
|
||||
}
|
||||
}
|
||||
PushScope(Scope::Kind::BlockData, &MakeSymbol(name, SubprogramDetails{}));
|
||||
if (name.source.empty()) {
|
||||
// Don't let unnamed BLOCK DATA conflict with unnamed PROGRAM
|
||||
PushScope(Scope::Kind::BlockData, nullptr);
|
||||
} else {
|
||||
PushScope(Scope::Kind::BlockData, &MakeSymbol(name, SubprogramDetails{}));
|
||||
}
|
||||
}
|
||||
|
||||
// If name is a generic, return specific subprogram with the same name.
|
||||
|
|
Loading…
Reference in New Issue