https://bugs.llvm.org/show_bug.cgi?id=45469

            Bug ID: 45469
           Summary: Omitting the optional variable-category of defaultmap
                    clause causes Clang to abort
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: OpenMP
          Assignee: unassignedclangb...@nondot.org
          Reporter: jennifer...@intel.com
                CC: llvm-bugs@lists.llvm.org

In OMP spec 5.0:

The syntax of the defaultmap clause is as follows:

defaultmap(implicit-behavior[:variable-category])

But current clang give error when omitting variable-category

cmplrllvm-11546>clang  -cc1 -fopenmp  -fopenmp-version=50 x.cpp
x.cpp:4:45: warning: missing ':' after defaultmap modifier - ignoring
  #pragma omp target defaultmap(firstprivate)
                                            ^
x.cpp:4:45: error: expected 'scalar', 'aggregate', 'pointer' in OpenMP clause
'defaultmap'
1 warning and 1 error generated.

cmplrllvm-11546>cat x.cpp
void implicit_maps_double_complex (int a){
  double _Complex dc = (double)a;

  #pragma omp target defaultmap(firstprivate)
  {
    dc *= dc;
  }
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to