[flang-commits] [flang] [FLANG][OPENMP] Fix handling of continuation lines in mixed OpenMP an… (PR #120714)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Fri Dec 20 10:54:06 PST 2024


================
@@ -0,0 +1,61 @@
+! RUN: flang-new -fopenmp -E %s 2>&1 | FileCheck %s --check-prefix=CHECK-OMP
+! RUN: flang-new -E %s 2>&1 | FileCheck %s 
+
+
+! Test in mixed way, i.e., combination of Fortran free source form 
+! and free source form with conditional compilation sentinel.
+! CHECK-LABEL: subroutine mixed_form1()
+! CHECK-OMP: i = 1 +100+ 1000+ 10 + 1 +1000000000 + 1000000
+! CHECK: i = 1 + 10 + 10000 + 1000000
+subroutine mixed_form1()
+   i = 1 &
+  !$+100&
+  !$&+ 1000&
+   &+ 10 + 1&
+  !$& +100000&
+   &0000 + 1000000
+end subroutine	
+
+
+
+! CHECK-LABEL: subroutine mixed_form2()
+! CHECK-OMP: i = 0
+! CHECK-OMP: i = 1 +100+ 1000+ 10 + 1 +1000000000 + 1000000
+! CHECK: i = 1 + 10 + 10000 + 1000000
+subroutine mixed_form2()
+!$ i = 0
+   i = 1 &
+  !$+100&
+  !$&+ 1000&
+   &+ 10 + 1&
+  !$& +100000&
+   & 0000 + 1000000
+
+end subroutine
----------------
luporl wrote:

With the changes suggested above, this test case would need to be removed.

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


More information about the flang-commits mailing list