[Flang] Allow compile *.f03, *.f08 file

Fix issue [#61260](https://github.com/llvm/llvm-project/issues/61260)

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D145845
This commit is contained in:
Shao-Ce SUN
2023-03-12 00:17:30 +08:00
parent c0dc8f7a29
commit b1fdcd5fbc
3 changed files with 14 additions and 0 deletions

View File

@@ -331,6 +331,10 @@ types::ID types::lookupTypeForExtension(llvm::StringRef Ext) {
.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)

View File

@@ -0,0 +1,5 @@
! RUN: %flang -### %s 2>&1 | FileCheck %s
! CHECK: "{{.*}}flang-new" "-fc1" {{.*}} "-o" "{{.*}}.o"
program f03
end program f03

View File

@@ -0,0 +1,5 @@
! RUN: %flang -### %s 2>&1 | FileCheck %s
! CHECK: "{{.*}}flang-new" "-fc1" {{.*}} "-o" "{{.*}}.o"
program f08
end program f08