<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - -fopenmp-simd is incorrectly required for _OPENMP to be defined to 201511"
   href="https://bugs.llvm.org/show_bug.cgi?id=42298">42298</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-fopenmp-simd is incorrectly required for _OPENMP to be defined to 201511
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Clang Compiler Support
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>steffen.seckler@tum.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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:

<span class="quote">> clang -fopenmp -dM -E - < /dev/null | grep -i openmp </span >
#define _OPENMP 201107

<span class="quote">> clang -fopenmp-simd -fopenmp -dM -E - < /dev/null | grep -i openmp </span >
#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:

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

<span class="quote">> g++ -fopenmp -dD -E - < /dev/null | grep -i openmp</span >
#define _OPENMP 201511

<span class="quote">> icpc -dD -E -qopenmp -qopenmp-simd - </dev/null | grep -i openmp</span >
#define _OPENMP 201611

<span class="quote">> icpc -dD -E -qopenmp - </dev/null | grep -i openmp</span >
#define _OPENMP 201611



see also: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - -fopenmp-simd incorrectly defines _OPENMP"
   href="show_bug.cgi?id=37536">https://bugs.llvm.org/show_bug.cgi?id=37536</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>