When -fdebug-dump-parse-tree is specified, dump the parse tree even
if semantic errors have occurred. This is necessary to see the parse
tree after it has been transformed.
Original-commit: flang-compiler/f18@
bbdb0717da953c959cb1b6c531684952c239b98b
Reviewed-on: https://github.com/flang-compiler/f18/pull/417
if (semantics.AnyFatalError()) {
std::cerr << driver.prefix << "semantic errors in " << path << '\n';
exitStatus = EXIT_FAILURE;
+ if (driver.dumpParseTree) {
+ Fortran::parser::DumpTree(std::cout, parseTree);
+ }
return {};
}
if (driver.dumpUnparseWithSymbols) {