summaryrefslogtreecommitdiff
path: root/test/Driver/gfortran.f90
diff options
context:
space:
mode:
Diffstat (limited to 'test/Driver/gfortran.f90')
-rw-r--r--test/Driver/gfortran.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Driver/gfortran.f90 b/test/Driver/gfortran.f90
index d531f59cd35b..e687e51b4df3 100644
--- a/test/Driver/gfortran.f90
+++ b/test/Driver/gfortran.f90
@@ -242,3 +242,19 @@
!
! Clang understands this one and orders it weirdly.
! CHECK: "-fsyntax-only"
+!
+! PR22234: Ensure that -fsyntax-only doesn't complain about output types and
+! passes along correctly.
+! RUN: %clang -no-canonical-prefixes -target i386-linux -fsyntax-only -### %s -o %t 2>&1 | \
+! grep for error message and command-line
+! RUN: grep -e error: -e -fsyntax-only | FileCheck %s --check-prefix=CHECK-PR22234
+!
+! CHECK-PR22234-NOT: clang: error: invalid output type
+! CHECK-PR22234: "-fsyntax-only"
+!
+! Regression test for the bug introduced with PR22234 fix.
+! Make sure -fsyntax-only is not passed to gfortran during normal compilation.
+!
+! RUN: %clang -no-canonical-prefixes -target i386-linux -### %s -o %t 2>&1 \
+! RUN: | FileCheck %s --check-prefix=CHECK-PR22234-R
+! CHECK-PR22234-R-NOT: "-fsyntax-only"