<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 --- - Assertion failed: (BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"), function operator=="
   href="https://llvm.org/bugs/show_bug.cgi?id=26081">26081</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: (BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"), function operator==
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>andrew@fubar.geek.nz
          </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=15594" name="attach_15594" title="Minimised test case">attachment 15594</a> <a href="attachment.cgi?id=15594&action=edit" title="Minimised test case">[details]</a></span>
Minimised test case

I'm hitting the following when building the attached test case with clang 3.8:

Assertion failed: (BitWidth == RHS.BitWidth && "Comparison requires equal bit
widths"), function operator==, file
/home/at718/freebsd/lib/clang/libllvmselectiondag/../../../contrib/llvm/include/llvm/ADT/APInt.h,
line 978.

I'm building with:

cc -cc1 -triple aarch64-unknown-freebsd11.0 -emit-obj csqrt_test-cc283e.c

The stack trace is:

#0  0x00000000021c87e9 in handle_signal ()
#1  0x00000000021c83e9 in thr_sighandler ()
#2  <signal handler called>
#3  0x000000000223014a in thr_kill ()
#4  0x000000000227cd09 in abort ()
#5  0x0000000002263aaa in __assert ()
#6  0x00000000017e7d75 in (anonymous
namespace)::SelectionDAGLegalize::ExpandNode ()
#7  0x00000000017da6ae in (anonymous
namespace)::SelectionDAGLegalize::LegalizeOp ()
#8  0x00000000017d9ad2 in llvm::SelectionDAG::Legalize ()
#9  0x000000000173ad5c in llvm::SelectionDAGISel::CodeGenAndEmitDAG ()
#10 0x0000000001739f0f in llvm::SelectionDAGISel::SelectAllBasicBlocks ()
#11 0x000000000173773c in llvm::SelectionDAGISel::runOnMachineFunction ()
#12 0x0000000001b1817a in llvm::MachineFunctionPass::runOnFunction ()
#13 0x00000000020292fb in llvm::FPPassManager::runOnFunction ()
#14 0x000000000202952b in llvm::FPPassManager::runOnModule ()
#15 0x0000000002029999 in llvm::legacy::PassManagerImpl::run ()
#16 0x000000000066b35a in clang::EmitBackendOutput ()
#17 0x0000000000668e5f in clang::BackendConsumer::HandleTranslationUnit ()
#18 0x0000000000866275 in clang::ParseAST ()
#19 0x00000000006673cc in clang::CodeGenAction::ExecuteAction ()
#20 0x0000000000442bbb in clang::FrontendAction::Execute ()
#21 0x0000000000466b41 in clang::CompilerInstance::ExecuteAction ()
#22 0x000000000040aed7 in clang::ExecuteCompilerInvocation ()
#23 0x0000000000400872 in cc1_main ()
#24 0x0000000000408ee7 in main ()</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>