[flang] Quick additional fix for crashes on statement functions without arguments
Original-commit: flang-compiler/f18@79779967a9 Reviewed-on: https://github.com/flang-compiler/f18/pull/548
This commit is contained in:
parent
c180c0229f
commit
24eb863fda
|
@ -215,6 +215,10 @@ Statement<ActionStmt> StmtFunctionStmt::ConvertToAssignment() {
|
|||
source.ExtendToCover(arg.source);
|
||||
}
|
||||
// extend source to include closing paren
|
||||
if (funcArgs.empty()) {
|
||||
CHECK(*source.end() == '(');
|
||||
source = CharBlock{source.begin(), source.end() + 1};
|
||||
}
|
||||
CHECK(*source.end() == ')');
|
||||
source = CharBlock{source.begin(), source.end() + 1};
|
||||
auto variable{Variable{common::Indirection{WithSource(
|
||||
|
|
Loading…
Reference in a new issue