<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Name mangling issue with OpenMP"
   href="https://llvm.org/bugs/show_bug.cgi?id=30632">30632</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Name mangling issue with OpenMP
          </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>andipeer@gmx.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17417" name="attach_17417" title="Minimal working example for the bug to show up">attachment 17417</a> <a href="attachment.cgi?id=17417&action=edit" title="Minimal working example for the bug to show up">[details]</a></span>
Minimal working example for the bug to show up

When compiling the given code with OpenMP support enabled, the compiler raises
the error:

main.cpp:4:10: error: definition with same mangled name as another definition
    void g(const L&) { }
         ^
main.cpp:4:10: note: previous definition is here


Without OpenMP, everything works fine. GCC has no problem in compiling the
given code with OpenMP enabled.

The crucial point for this bug seems to be a combination of templates, lambdas,
and OpenMP. Removing one of these factors, the code compiles as expected.


Command line for compiling: "clang -std=c++11 -fopenmp main.cpp"</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>