[flang-commits] [flang] 5580cb8 - [flang][OpenMP] Diagnose array element references to UDR special variables (#231559)

via flang-commits flang-commits at lists.llvm.org
Wed Oct 14 11:50:17 PDT 2026


Author: Carlos Seo
Date: 2026-10-14T15:50:09-03:00
New Revision: 5580cb8b28a8e400b6374bf634ebf00652716f6d

URL: https://github.com/llvm/llvm-project/commit/5580cb8b28a8e400b6374bf634ebf00652716f6d
DIFF: https://github.com/llvm/llvm-project/commit/5580cb8b28a8e400b6374bf634ebf00652716f6d.diff

LOG: [flang][OpenMP] Diagnose array element references to UDR special variables (#231559)

In OpenMP 6.0, user-defined reduction combiners and initializers are
treated as elemental, so omp_in, omp_out, omp_priv and omp_orig are
scalars, and any selectors in their designators must be component
selectors.

These special variables were declared as entities with unknown details
and a reference like omp_out(1) made them be treated as implicit
external functions.

Also, OmpInVar|OmpOutVar|OmpPrivVar|OmpOrigVar flags were never set
because the symbol lookup was done in the wrong scope.

Convert the special variables to object entities when they are declared,
set the flags on the declared symbols and treat a parenthesized
reference to a flagged scalar as an array element, so that the same
"'omp_out' is not an array" error is reported as for array sections.

Fixes #193431

Assisted-by: Claude Fable 5.1

Added: 
    flang/test/Semantics/OpenMP/declare-reduction-scalar-vars.f90

Modified: 
    flang/lib/Semantics/expression.cpp
    flang/lib/Semantics/resolve-directives.cpp
    flang/lib/Semantics/resolve-names.cpp
    flang/test/Semantics/OpenMP/declare-reduction-functions.f90
    flang/test/Semantics/OpenMP/declare-reduction-logical.f90
    flang/test/Semantics/OpenMP/declare-reduction-operator.f90
    flang/test/Semantics/OpenMP/declare-reduction-operators.f90
    flang/test/Semantics/OpenMP/declare-reduction-renamedop.f90
    flang/test/Semantics/OpenMP/declare-reduction.f90

Removed: 
    


################################################################################
diff  --git a/flang/lib/Semantics/expression.cpp b/flang/lib/Semantics/expression.cpp
index ef2ae91d88a86..63e4fa4c53dc4 100644
--- a/flang/lib/Semantics/expression.cpp
+++ b/flang/lib/Semantics/expression.cpp
@@ -4646,6 +4646,15 @@ static bool CheckFuncRefToArrayElement(semantics::SemanticsContext &context,
   if (!name->symbol) {
     return false;
   } else if (name->symbol->Rank() == 0) {
+    // The OpenMP special variables in DECLARE REDUCTION combiners and
+    // initializers are data objects, so a parenthesized reference to one
+    // of them can only be an (invalid) array element reference.
+    if (name->symbol->test(Symbol::Flag::OmpInVar) ||
+        name->symbol->test(Symbol::Flag::OmpOutVar) ||
+        name->symbol->test(Symbol::Flag::OmpPrivVar) ||
+        name->symbol->test(Symbol::Flag::OmpOrigVar)) {
+      return true;
+    }
     if (const Symbol *function{
             semantics::IsFunctionResultWithSameNameAsFunction(*name->symbol)}) {
       auto &msg{context.Say(funcRef.source,

diff  --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp
index 3d9e92e26eed2..c5a23e1adda39 100644
--- a/flang/lib/Semantics/resolve-directives.cpp
+++ b/flang/lib/Semantics/resolve-directives.cpp
@@ -522,8 +522,8 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
     };
     if (auto &name{std::get<parser::ObjectName>(x.var.t)}; name.symbol) {
       if (auto found{map.find(name.ToString())}; found != map.end()) {
-        ResolveOmp(name, found->second,
-            const_cast<Scope &>(DEREF(name.symbol).owner()));
+        ResolveOmp(*name.symbol, found->second,
+            const_cast<Scope &>(name.symbol->owner()));
       }
     }
     return false;

diff  --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 30c4466b847cd..d0964294d10c0 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -2059,6 +2059,13 @@ bool OmpVisitor::Pre(const parser::OmpStylizedDeclaration &x) {
   BeginDecl();
   Walk(x.type.get());
   Walk(x.var);
+  // The special variables (omp_in, omp_out, omp_priv, omp_orig) are data
+  // objects. Make them object entities explicitly, so that a reference like
+  // omp_out(1) is not reinterpreted as a call to an external function.
+  // See issue #193431.
+  if (auto *symbol{std::get<parser::ObjectName>(x.var.t).symbol}) {
+    ConvertToObjectEntity(*symbol);
+  }
   return true;
 }
 

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction-functions.f90 b/flang/test/Semantics/OpenMP/declare-reduction-functions.f90
index cc7be7859c2e4..b54c3d2a9571c 100644
--- a/flang/test/Semantics/OpenMP/declare-reduction-functions.f90
+++ b/flang/test/Semantics/OpenMP/declare-reduction-functions.f90
@@ -56,11 +56,11 @@ function functwo(x, n)
     !$omp declare reduction(adder:two:omp_out=add_two(omp_out,omp_in)) initializer(inittwo(omp_priv,0))
 !CHECK: adder: UserReductionDetails TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_in size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_out size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_in (OmpInVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_out (OmpOutVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_priv size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_orig (OmpOrigVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_priv (OmpPrivVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 
 
     !$omp simd reduction(adder:res)
@@ -101,17 +101,17 @@ function functwothree(x, n)
 
 !CHECK: adder: UserReductionDetails TYPE(two) TYPE(three)
 !CHECK OtherConstruct scope
-!CHECK: omp_in size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_out size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_in (OmpInVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_out (OmpOutVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_priv size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_orig (OmpOrigVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_priv (OmpPrivVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_in size=24 offset=0: ObjectEntity type: TYPE(three)
-!CHECK: omp_out size=24 offset=24: ObjectEntity type: TYPE(three)
+!CHECK: omp_in (OmpInVar) size=24 offset=0: ObjectEntity type: TYPE(three)
+!CHECK: omp_out (OmpOutVar) size=24 offset=24: ObjectEntity type: TYPE(three)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=24 offset=0: ObjectEntity type: TYPE(three)
-!CHECK: omp_priv size=24 offset=24: ObjectEntity type: TYPE(three)
+!CHECK: omp_orig (OmpOrigVar) size=24 offset=0: ObjectEntity type: TYPE(three)
+!CHECK: omp_priv (OmpPrivVar) size=24 offset=24: ObjectEntity type: TYPE(three)
 
     !$omp simd reduction(adder:res3)
     do i=1,n
@@ -137,11 +137,11 @@ function funcBtwo(x, n)
     !$omp declare reduction(+:two:omp_out=add_two(omp_out,omp_in)) initializer(inittwo(omp_priv,0))
 !CHECK: op.+: UserReductionDetails TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_in size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_out size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_in (OmpInVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_out (OmpOutVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_priv size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_orig (OmpOrigVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_priv (OmpPrivVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 
 
     !$omp simd reduction(+:res)
@@ -166,17 +166,17 @@ function funcBtwothree(x, n)
 
 !CHECK: op.+: UserReductionDetails TYPE(two) TYPE(three)
 !CHECK OtherConstruct scope
-!CHECK: omp_in size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_out size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_in (OmpInVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_out (OmpOutVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=8 offset=0: ObjectEntity type: TYPE(two)
-!CHECK: omp_priv size=8 offset=8: ObjectEntity type: TYPE(two)
+!CHECK: omp_orig (OmpOrigVar) size=8 offset=0: ObjectEntity type: TYPE(two)
+!CHECK: omp_priv (OmpPrivVar) size=8 offset=8: ObjectEntity type: TYPE(two)
 !CHECK: OtherConstruct scope
-!CHECK: omp_in size=24 offset=0: ObjectEntity type: TYPE(three)
-!CHECK: omp_out size=24 offset=24: ObjectEntity type: TYPE(three)
+!CHECK: omp_in (OmpInVar) size=24 offset=0: ObjectEntity type: TYPE(three)
+!CHECK: omp_out (OmpOutVar) size=24 offset=24: ObjectEntity type: TYPE(three)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=24 offset=0: ObjectEntity type: TYPE(three)
-!CHECK: omp_priv size=24 offset=24: ObjectEntity type: TYPE(three)
+!CHECK: omp_orig (OmpOrigVar) size=24 offset=0: ObjectEntity type: TYPE(three)
+!CHECK: omp_priv (OmpPrivVar) size=24 offset=24: ObjectEntity type: TYPE(three)
 
     !$omp simd reduction(+:res3)
     do i=1,n
@@ -199,11 +199,11 @@ pure logical function reduction()
 !CHECK: reduction size=4 offset=0: ObjectEntity funcResult type: LOGICAL(4)
 !CHECK: rr: UserReductionDetails INTEGER(4)
 !CHECK: OtherConstruct scope: size=8 alignment=4 sourceRange=0 bytes
-!CHECK: omp_in size=4 offset=0: ObjectEntity type: INTEGER(4)
-!CHECK: omp_out size=4 offset=4: ObjectEntity type: INTEGER(4)
+!CHECK: omp_in (OmpInVar) size=4 offset=0: ObjectEntity type: INTEGER(4)
+!CHECK: omp_out (OmpOutVar) size=4 offset=4: ObjectEntity type: INTEGER(4)
 !CHECK: OtherConstruct scope: size=8 alignment=4 sourceRange=0 bytes
-!CHECK: omp_orig size=4 offset=0: ObjectEntity type: INTEGER(4)
-!CHECK: omp_priv size=4 offset=4: ObjectEntity type: INTEGER(4)
+!CHECK: omp_orig (OmpOrigVar) size=4 offset=0: ObjectEntity type: INTEGER(4)
+!CHECK: omp_priv (OmpPrivVar) size=4 offset=4: ObjectEntity type: INTEGER(4)
     !$omp declare reduction (rr : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
     reduction = .false.
   end function reduction

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction-logical.f90 b/flang/test/Semantics/OpenMP/declare-reduction-logical.f90
index 3041c58a764ea..03a08a73b0448 100644
--- a/flang/test/Semantics/OpenMP/declare-reduction-logical.f90
+++ b/flang/test/Semantics/OpenMP/declare-reduction-logical.f90
@@ -17,11 +17,11 @@ function func(x, n)
     !$omp declare reduction(.AND.:type(logicalwrapper):omp_out%b=omp_out%b .AND. omp_in%b) initializer(omp_priv%b=.true.)
 !CHECK: op.AND: UserReductionDetails TYPE(logicalwrapper)
 !CHECK OtherConstruct scope
-!CHECK: omp_in size=4 offset=0: ObjectEntity type: TYPE(logicalwrapper)
-!CHECK: omp_out size=4 offset=4: ObjectEntity type: TYPE(logicalwrapper)
+!CHECK: omp_in (OmpInVar) size=4 offset=0: ObjectEntity type: TYPE(logicalwrapper)
+!CHECK: omp_out (OmpOutVar) size=4 offset=4: ObjectEntity type: TYPE(logicalwrapper)
 !CHECK OtherConstruct scope
-!CHECK: omp_orig size=4 offset=0: ObjectEntity type: TYPE(logicalwrapper)
-!CHECK: omp_priv size=4 offset=4: ObjectEntity type: TYPE(logicalwrapper)
+!CHECK: omp_orig (OmpOrigVar) size=4 offset=0: ObjectEntity type: TYPE(logicalwrapper)
+!CHECK: omp_priv (OmpPrivVar) size=4 offset=4: ObjectEntity type: TYPE(logicalwrapper)
 
     !$omp simd reduction(.AND.:res)
     do i=1,n

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction-operator.f90 b/flang/test/Semantics/OpenMP/declare-reduction-operator.f90
index 5fc42054882f0..c196ac81c22b5 100644
--- a/flang/test/Semantics/OpenMP/declare-reduction-operator.f90
+++ b/flang/test/Semantics/OpenMP/declare-reduction-operator.f90
@@ -12,8 +12,8 @@ module m1
 !CHECK: op.fluffy., PUBLIC: UserReductionDetails TYPE(t1)
 !CHECK: t1, PUBLIC: DerivedType components: val
 !CHECK: OtherConstruct scope: size=8 alignment=4 sourceRange=0 bytes
-!CHECK: omp_in size=4 offset=0: ObjectEntity type: TYPE(t1)
-!CHECK: omp_out size=4 offset=4: ObjectEntity type: TYPE(t1)
+!CHECK: omp_in (OmpInVar) size=4 offset=0: ObjectEntity type: TYPE(t1)
+!CHECK: omp_out (OmpOutVar) size=4 offset=4: ObjectEntity type: TYPE(t1)
 contains
   function my_mul(x, y)
     type (t1), intent (in) :: x, y

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction-operators.f90 b/flang/test/Semantics/OpenMP/declare-reduction-operators.f90
index e23e7d1ff865d..82acfd788619b 100644
--- a/flang/test/Semantics/OpenMP/declare-reduction-operators.f90
+++ b/flang/test/Semantics/OpenMP/declare-reduction-operators.f90
@@ -63,11 +63,11 @@ program test_vector
 !CHECK: vector: Use from vector in vector_mod
 
 !CHECK: OtherConstruct scope:
-!CHECK: omp_in size=12 offset=0: ObjectEntity type: TYPE(vector)
-!CHECK: omp_out size=12 offset=12: ObjectEntity type: TYPE(vector)
+!CHECK: omp_in (OmpInVar) size=12 offset=0: ObjectEntity type: TYPE(vector)
+!CHECK: omp_out (OmpOutVar) size=12 offset=12: ObjectEntity type: TYPE(vector)
 !CHECK: OtherConstruct scope:
-!CHECK: omp_orig size=12 offset=0: ObjectEntity type: TYPE(vector)
-!CHECK: omp_priv size=12 offset=12: ObjectEntity type: TYPE(vector)
+!CHECK: omp_orig (OmpOrigVar) size=12 offset=0: ObjectEntity type: TYPE(vector)
+!CHECK: omp_priv (OmpPrivVar) size=12 offset=12: ObjectEntity type: TYPE(vector)
 
   v2 = Vector(0.0, 0.0, 0.0)
   v1 = Vector(1.0, 2.0, 3.0)

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction-renamedop.f90 b/flang/test/Semantics/OpenMP/declare-reduction-renamedop.f90
index 115fe517be181..080b73603aa72 100644
--- a/flang/test/Semantics/OpenMP/declare-reduction-renamedop.f90
+++ b/flang/test/Semantics/OpenMP/declare-reduction-renamedop.f90
@@ -34,11 +34,11 @@ program test_omp_reduction
 !CHECK: op.modmul.: UserReductionDetails TYPE(t1)
 !CHECK: t1: Use from t1 in module1
 !CHECK: OtherConstruct scope: size=8 alignment=4 sourceRange=0 bytes
-!CHECK: omp_in size=4 offset=0: ObjectEntity type: TYPE(t1)
-!CHECK: omp_out size=4 offset=4: ObjectEntity type: TYPE(t1)
+!CHECK: omp_in (OmpInVar) size=4 offset=0: ObjectEntity type: TYPE(t1)
+!CHECK: omp_out (OmpOutVar) size=4 offset=4: ObjectEntity type: TYPE(t1)
 !CHECK: OtherConstruct scope: size=8 alignment=4 sourceRange=0 bytes
-!CHECK: omp_orig size=4 offset=0: ObjectEntity type: TYPE(t1)
-!CHECK: omp_priv size=4 offset=4: ObjectEntity type: TYPE(t1)
+!CHECK: omp_orig (OmpOrigVar) size=4 offset=0: ObjectEntity type: TYPE(t1)
+!CHECK: omp_priv (OmpPrivVar) size=4 offset=4: ObjectEntity type: TYPE(t1)
   result = t1(1.0)
   !$omp parallel do reduction(.modmul.:result)
   do i = 1, 10

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction-scalar-vars.f90 b/flang/test/Semantics/OpenMP/declare-reduction-scalar-vars.f90
new file mode 100644
index 0000000000000..c08a8f42a20aa
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/declare-reduction-scalar-vars.f90
@@ -0,0 +1,61 @@
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
+! The special variables omp_in, omp_out, omp_priv and omp_orig in DECLARE
+! REDUCTION are scalars: any selectors in their designators must be component
+! selectors.
+
+module m
+  type t
+    integer :: x
+    integer :: a(4)
+  end type
+contains
+  subroutine comb(o, i)
+    type(t) :: o, i
+    o%x = o%x + i%x
+  end
+  subroutine init(p, q)
+    type(t) :: p, q
+    p = q
+  end
+  pure integer function f(a, b)
+    integer, intent(in) :: a, b
+    f = a + b
+  end
+end module
+
+subroutine valid
+  use m
+  !$omp declare reduction(r1:t:omp_out%x = omp_out%x + omp_in%x) &
+  !$omp& initializer(omp_priv = t(0, 0))
+  !$omp declare reduction(r2:t:comb(omp_out, omp_in)) &
+  !$omp& initializer(init(omp_priv, omp_orig))
+  !$omp declare reduction(r3:integer:omp_out = f(omp_out, omp_in)) &
+  !$omp& initializer(omp_priv = omp_orig)
+  !$omp declare reduction(r4:t:omp_out%a(1) = omp_out%a(1) + omp_in%a(2)) &
+  !$omp& initializer(omp_priv = omp_orig)
+end
+
+subroutine invalid
+  interface
+    subroutine s1(k)
+      integer :: k
+    end
+    subroutine s2(k, n)
+      integer :: k, n
+    end
+  end interface
+  !ERROR: 'omp_out' is not an array
+  !$omp declare reduction(aaa:integer:s1(omp_out(1))) initializer(omp_priv=0)
+  !ERROR: 'omp_in' is not an array
+  !$omp declare reduction(bbb:integer:s2(omp_out,omp_in(1))) initializer(omp_priv=0)
+  !ERROR: 'omp_in' is not an array
+  !$omp declare reduction(ccc:integer:omp_out=omp_in(1)) initializer(omp_priv=0)
+  !ERROR: 'omp_out' is not an array
+  !$omp declare reduction(ddd:integer:omp_out(1)=omp_in) initializer(omp_priv=0)
+  !ERROR: 'omp_out' is not an array
+  !$omp declare reduction(eee:integer:omp_out=omp_in+omp_out(:)) initializer(omp_priv=0)
+  !ERROR: 'omp_orig' is not an array
+  !$omp declare reduction(fff:integer:omp_out=omp_in) initializer(omp_priv=omp_orig(1))
+  !ERROR: 'omp_priv' is not an array
+  !$omp declare reduction(ggg:integer:omp_out=omp_in) initializer(s1(omp_priv(1)))
+end

diff  --git a/flang/test/Semantics/OpenMP/declare-reduction.f90 b/flang/test/Semantics/OpenMP/declare-reduction.f90
index 6727dd57eb56c..8638f25e04600 100644
--- a/flang/test/Semantics/OpenMP/declare-reduction.f90
+++ b/flang/test/Semantics/OpenMP/declare-reduction.f90
@@ -20,11 +20,11 @@ end subroutine initme
 !CHECK: red_add: UserReductionDetails
 !CHECK: Subprogram scope: initme
 !CHECK: OtherConstruct scope:
-!CHECK: omp_in size=4 offset=0: ObjectEntity type: INTEGER(4)
-!CHECK: omp_out size=4 offset=4: ObjectEntity type: INTEGER(4)
+!CHECK: omp_in (OmpInVar) size=4 offset=0: ObjectEntity type: INTEGER(4)
+!CHECK: omp_out (OmpOutVar) size=4 offset=4: ObjectEntity type: INTEGER(4)
 !CHECK: OtherConstruct scope:
-!CHECK: omp_orig size=4 offset=0: ObjectEntity type: INTEGER(4)
-!CHECK: omp_priv size=4 offset=4: ObjectEntity type: INTEGER(4)
+!CHECK: omp_orig (OmpOrigVar) size=4 offset=0: ObjectEntity type: INTEGER(4)
+!CHECK: omp_priv (OmpPrivVar) size=4 offset=4: ObjectEntity type: INTEGER(4)
 !$omp simd reduction(red_add:res)
   do i=1,n
      res=res+x(i)
@@ -39,10 +39,10 @@ program main
 
 !CHECK: my_add_red: UserReductionDetails
 !CHECK: OtherConstruct scope:
-!CHECK: omp_in size=4 offset=0: ObjectEntity type: INTEGER(4)
-!CHECK: omp_out size=4 offset=4: ObjectEntity type: INTEGER(4)
+!CHECK: omp_in (OmpInVar) size=4 offset=0: ObjectEntity type: INTEGER(4)
+!CHECK: omp_out (OmpOutVar) size=4 offset=4: ObjectEntity type: INTEGER(4)
 !CHECK: OtherConstruct scope:
-!CHECK: omp_orig size=4 offset=0: ObjectEntity type: INTEGER(4)
-!CHECK: omp_priv size=4 offset=4: ObjectEntity type: INTEGER(4)
+!CHECK: omp_orig (OmpOrigVar) size=4 offset=0: ObjectEntity type: INTEGER(4)
+!CHECK: omp_priv (OmpPrivVar) size=4 offset=4: ObjectEntity type: INTEGER(4)
 
 end program main


        


More information about the flang-commits mailing list