[flang-commits] [clang] [flang] [Flang][OpenMP] Add -fdo-concurrent alias for -fdo-concurrent-to-openmp (PR #195007)
Tarun Prabhu via flang-commits
flang-commits at lists.llvm.org
Thu Apr 30 08:08:38 PDT 2026
================
@@ -2,24 +2,35 @@
! RUN: %flang --help | FileCheck %s --check-prefix=FLANG
-! FLANG: -fdo-concurrent-to-openmp=<value>
-! FLANG-NEXT: Try to map `do concurrent` loops to OpenMP [none|host|device]
+! FLANG: -fdo-concurrent=<value>
+! FLANG-SAME: Try to map `do concurrent` loops to OpenMP [none|host|device]
! RUN: bbc --help | FileCheck %s --check-prefix=BBC
-! BBC: -fdo-concurrent-to-openmp=<string>
+! BBC: -fdo-concurrent=<string>
! BBC-SAME: Try to map `do concurrent` loops to OpenMP [none|host|device]
-! RUN: %flang -c -fdo-concurrent-to-openmp=host %s 2>&1 \
+! RUN: %flang -c -fdo-concurrent=host %s 2>&1 \
! RUN: | FileCheck %s --check-prefix=OPT
! OPT: warning: OpenMP is required for lowering `do concurrent` loops to OpenMP.
! OPT-SAME: Enable OpenMP using `-fopenmp`.
-! RUN: not %flang -c -fopenmp -fdo-concurrent-to-openmp=devic,e %s 2>&1 \
+! RUN: not %flang -c -fopenmp -fdo-concurrent=devic,e %s 2>&1 \
! RUN: | FileCheck %s --check-prefix=BADVAL
-! BADVAL: error: invalid value 'devic,e' in '-fdo-concurrent-to-openmp{{.*}}'
+! BADVAL: error: invalid value 'devic,e' in '-fdo-concurrent{{.*}}'
+
+! RUN: %flang -c -fdo-concurrent-to-openmp=host %s 2>&1 \
+! RUN: | FileCheck %s --check-prefix=OPT-ALIAS
+
+! OPT-ALIAS: warning: OpenMP is required for lowering `do concurrent` loops to OpenMP.
+! OPT-ALIAS-SAME: Enable OpenMP using `-fopenmp`.
+
+! RUN: not %flang -c -fopenmp -fdo-concurrent-to-openmp=devic,e %s 2>&1 \
+! RUN: | FileCheck %s --check-prefix=BADVAL-ALIAS
+
+! BADVAL-ALIAS: error: invalid value 'devic,e' in '-fdo-concurrent-to-openmp{{.*}}'
----------------
tarunprabhu wrote:
Both `BADVAL` and `BADVAL-ALIAS` are checking for the same error message. Do you want to explicitly check that the error message uses the correct option spelling in the presence of aliases?
https://github.com/llvm/llvm-project/pull/195007
More information about the flang-commits
mailing list