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

            Bug ID: 42298
           Summary: -fopenmp-simd is incorrectly required for _OPENMP to
                    be defined to 201511
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

When OpenMP is enabled (via -fopenmp) the Macro _OPENMP should be defined to
the current standard supported in clang, i.e., 201511.
However, currently (as of clang 8.0) -fopenmp-simd needs to also be set to
define _OPENMP to 201511:

> clang -fopenmp -dM -E - < /dev/null | grep -i openmp 
#define _OPENMP 201107

> clang -fopenmp-simd -fopenmp -dM -E - < /dev/null | grep -i openmp 
#define _OPENMP 201511

One of the main reasons to do this is that OpenMP 4.5 includes things other
than simd operations (e.g. taskloops).

gcc (v7.4.0) and the intel compiler(2019) do it accordingly:

> g++ -fopenmp-simd -fopenmp -dD -E - < /dev/null | grep -i openmp
#define _OPENMP 201511

> g++ -fopenmp -dD -E - < /dev/null | grep -i openmp
#define _OPENMP 201511

> icpc -dD -E -qopenmp -qopenmp-simd - </dev/null | grep -i openmp
#define _OPENMP 201611

> icpc -dD -E -qopenmp - </dev/null | grep -i openmp
#define _OPENMP 201611



see also: https://bugs.llvm.org/show_bug.cgi?id=37536

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

Reply via email to