[llvm-bugs] [Bug 28973] New: clang -fopenmp -ffast-math causes compile failures with gnu math.h

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 14 12:44:35 PDT 2016


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

            Bug ID: 28973
           Summary: clang -fopenmp -ffast-math causes compile failures
                    with gnu math.h
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dan_gulotta at yahoo.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

When OpenMP is enabled in Clang, the _OPENMP macro is set to 201307, indicating
support for OpenMP 4.  Defining the _OPENMP macro this way will cause some
header files to try to use OpenMP 4 features not yet supported by Clang.  In
particular, GNU's bits/math-vector.h will use "omp declare simd notinbranch"
when __FAST_MATH__ is defined and _OPENMP >= 201307, leading to compile errors.
 Manually defining _OPENMP to be 201107 makes the problem go away.

-- 
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/20160814/8f46a311/attachment.html>


More information about the llvm-bugs mailing list