[llvm-bugs] [Bug 42298] New: -fopenmp-simd is incorrectly required for _OPENMP to be defined to 201511

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 17 05:13:14 PDT 2019


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: unassignedclangbugs at nondot.org
          Reporter: steffen.seckler at tum.de
                CC: llvm-bugs at lists.llvm.org

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190617/9eeb7a2d/attachment.html>


More information about the llvm-bugs mailing list