<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 - Assertion failed: (Proto && "Functions without a prototype cannot be overloaded"), function AddOverloadCandidate, file tools/clang/lib/Sema/SemaOverload.cpp, line 5901."
   href="https://bugs.llvm.org/show_bug.cgi?id=36130">36130</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: (Proto && "Functions without a prototype cannot be overloaded"), function AddOverloadCandidate, file tools/clang/lib/Sema/SemaOverload.cpp, line 5901.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dimitry@andric.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As reported in <a href="https://bugs.freebsd.org/205934">https://bugs.freebsd.org/205934</a>, a configure script test uses
the following very short fragment to check #pragma weak support:

extern int test2();
#pragma weak test2 = test1
int test1() { return 0; }
int main() { return test2(); return 0; }

Compiling this without any special flags already asserts:

$ clang -cc1 -triple x86_64 -S weak.c
Assertion failed: (Proto && "Functions without a prototype cannot be
overloaded"), function AddOverloadCandidate, file
/usr/src/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp, line 5903.
Abort trap

This has apparently been happening since forever, the oldest version I checked
was trunk r185261, but it is still reproducible with trunk r323607, as of
2018-01-28.

Would be nice to fix it after all those years... :)</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>