[flang-commits] [flang] [Flang] Fix -Wopen-mp-* and -Wopen-acc-* flag spellings (PR #188434)
Andre Kuhlenschmidt via flang-commits
flang-commits at lists.llvm.org
Wed Apr 15 11:18:37 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
----------------
akuhlens wrote:
No, `threadprivate-equivalence.f90`, doesn't pass the flag `-Wopen-mp` or `-Wno-open-mp` and check that it still gets warnings or still disables warnings. It relies on it being enabled by default. You are missing a test case.
https://github.com/llvm/llvm-project/pull/188434
More information about the flang-commits
mailing list