[flang-commits] [flang] [Flang] Fix -Wopen-mp-* and -Wopen-acc-* flag spellings (PR #188434)

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Thu Mar 26 02:50:48 PDT 2026


================
@@ -0,0 +1,17 @@
+! Test that the deprecated -Wopen-mp-* and -Wopen-acc-* spellings produce
+! deprecation warnings and suggest the canonical -Wopenmp-* / -Wopenacc-*
+! spellings.
+
+! RUN: %flang_fc1 -fsyntax-only -Wopen-mp-usage %s 2>&1 | FileCheck --allow-empty --check-prefix=DEPRECATED %s
+! RUN: %flang_fc1 -fsyntax-only -Wno-open-mp-usage %s 2>&1 | FileCheck --allow-empty --check-prefix=DEPRECATED-NO %s
+! RUN: %flang_fc1 -fsyntax-only -Wopen-acc-usage %s 2>&1 | FileCheck --allow-empty --check-prefix=DEPRECATED-ACC %s
+! RUN: %flang_fc1 -fsyntax-only -Wopenmp-usage %s 2>&1 | FileCheck --allow-empty --check-prefix=CANONICAL %s
+! RUN: %flang_fc1 -fsyntax-only -Wopenacc-usage %s 2>&1 | FileCheck --allow-empty --check-prefix=CANONICAL %s
+
+! DEPRECATED: warning: -Wopen-mp-usage is deprecated; use -Wopenmp-usage instead
+! DEPRECATED-NO: warning: -Wno-open-mp-usage is deprecated; use -Wno-openmp-usage instead
+! DEPRECATED-ACC: warning: -Wopen-acc-usage is deprecated; use -Wopenacc-usage instead
+! CANONICAL-NOT: deprecated
+
+program test
+end program test
----------------
mjklemm wrote:

That part is tested in the respective feature tests, e.g., `threadprivate-equivalence.f90`.  Is that sufficient?

https://github.com/llvm/llvm-project/pull/188434


More information about the flang-commits mailing list