[PATCH] D100648: [flang][f18] Add an additional check for semantic errors
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 16 08:46:10 PDT 2021
awarzynski updated this revision to Diff 338135.
awarzynski added a comment.
Revert `%flang_fc1` --> `%f18` (leftover from experimenting)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100648/new/
https://reviews.llvm.org/D100648
Files:
flang/test/Semantics/data05.f90
flang/test/Semantics/offsets01.f90
flang/test/Semantics/offsets02.f90
flang/test/Semantics/typeinfo01.f90
flang/tools/f18/f18.cpp
Index: flang/tools/f18/f18.cpp
===================================================================
--- flang/tools/f18/f18.cpp
+++ flang/tools/f18/f18.cpp
@@ -277,6 +277,12 @@
if (driver.dumpSymbols) {
semantics.DumpSymbols(llvm::outs());
}
+ if (semantics.AnyFatalError()) {
+ llvm::errs() << driver.prefix << "Semantic errors in " << path << '\n';
+ semantics.EmitMessages(llvm::errs());
+ exitStatus = EXIT_FAILURE;
+ return {};
+ }
if (driver.dumpUnparseWithSymbols) {
Fortran::semantics::UnparseWithSymbols(
llvm::outs(), parseTree, driver.encoding);
Index: flang/test/Semantics/typeinfo01.f90
===================================================================
--- flang/test/Semantics/typeinfo01.f90
+++ flang/test/Semantics/typeinfo01.f90
@@ -1,4 +1,4 @@
-!RUN: %f18 -fdebug-dump-symbols %s | FileCheck %s
+!RUN: not %f18 -fdebug-dump-symbols %s | FileCheck %s
! Tests for derived type runtime descriptions
module m01
Index: flang/test/Semantics/offsets02.f90
===================================================================
--- flang/test/Semantics/offsets02.f90
+++ flang/test/Semantics/offsets02.f90
@@ -1,4 +1,4 @@
-!RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
+!RUN: not %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
! Size and alignment of derived types
Index: flang/test/Semantics/offsets01.f90
===================================================================
--- flang/test/Semantics/offsets01.f90
+++ flang/test/Semantics/offsets01.f90
@@ -1,4 +1,4 @@
-!RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
+!RUN: not %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
! Size and alignment of intrinsic types
subroutine s1
Index: flang/test/Semantics/data05.f90
===================================================================
--- flang/test/Semantics/data05.f90
+++ flang/test/Semantics/data05.f90
@@ -1,4 +1,4 @@
-!RUN: %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
+!RUN: not %flang_fc1 -fdebug-dump-symbols %s | FileCheck %s
module m
interface
integer function ifunc(n)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100648.338135.patch
Type: text/x-patch
Size: 2108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210416/53b00395/attachment.bin>
More information about the llvm-commits
mailing list