[PATCH] D145845: [Flang] Allow compile *.f03, *.f08 file

Shao-Ce SUN via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 11 07:11:21 PST 2023


sunshaoce updated this revision to Diff 504360.
sunshaoce added a comment.

Remove -flang-experimental-exec


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145845/new/

https://reviews.llvm.org/D145845

Files:
  clang/lib/Driver/Types.cpp
  flang/test/Driver/f03-suffix.f03
  flang/test/Driver/f08-suffix.f08


Index: flang/test/Driver/f08-suffix.f08
===================================================================
--- /dev/null
+++ flang/test/Driver/f08-suffix.f08
@@ -0,0 +1,6 @@
+! RUN: %flang -### %s 2>&1 | FileCheck %s
+
+! CHECK: "{{.*}}flang-new" "-fc1" {{.*}} "/tmp/{{.*}}.o"
+! CHECK: "{{.*}}ld" {{.*}} "/tmp/{{.*}}.o"
+program f08
+end program f08
Index: flang/test/Driver/f03-suffix.f03
===================================================================
--- /dev/null
+++ flang/test/Driver/f03-suffix.f03
@@ -0,0 +1,6 @@
+! RUN: %flang -### %s 2>&1 | FileCheck %s
+
+! CHECK: "{{.*}}flang-new" "-fc1" {{.*}} "/tmp/{{.*}}.o"
+! CHECK: "{{.*}}ld" {{.*}} "/tmp/{{.*}}.o"
+program f03
+end program f03
Index: clang/lib/Driver/Types.cpp
===================================================================
--- clang/lib/Driver/Types.cpp
+++ clang/lib/Driver/Types.cpp
@@ -331,6 +331,10 @@
       .Case("cui", TY_PP_CUDA)
       .Case("cxx", TY_CXX)
       .Case("CXX", TY_CXX)
+      .Case("F03", TY_Fortran)
+      .Case("f03", TY_PP_Fortran)
+      .Case("F08", TY_Fortran)
+      .Case("f08", TY_PP_Fortran)
       .Case("F90", TY_Fortran)
       .Case("f90", TY_PP_Fortran)
       .Case("F95", TY_Fortran)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145845.504360.patch
Type: text/x-patch
Size: 1210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230311/fb10375a/attachment.bin>


More information about the cfe-commits mailing list