[LLVMbugs] [Bug 21714] New: _umul128 symbol not found with clang-cl

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 2 14:03:49 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21714

            Bug ID: 21714
           Summary: _umul128 symbol not found with clang-cl
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This program builds fine with cl, but not with clang-cl:

D:\src\llvm-ninja-rel64> type davidben.cc
#include <intrin.h>
#include <stdint.h>
#include <stdio.h>

int main() {
  uint64_t lo, hi;
  lo = _umul128(1234, 5678, &hi);
  printf("0x%08llx%08llx\n", hi, lo);
  return 0;
}
D:\src\llvm-ninja-rel64>cl davidben.cc
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

davidben.cc
Microsoft (R) Incremental Linker Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:davidben.exe
davidben.obj

D:\src\llvm-ninja-rel64>where cl
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe

D:\src\llvm-ninja-rel64>bin\clang-cl.exe davidben.cc
davidben-13b75d.obj : error LNK2019: unresolved external symbol _umul128
referenced in function main
davidben.exe : fatal error LNK1120: 1 unresolved externals
clang-cl.exe: error: linker command failed with exit code 1120 (use -v to see
invocation)


With 32bit cl, things don't work:

D:\src\llvm-ninja-rel64>where cl
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl.exe

D:\src\llvm-ninja-rel64>cl davidben.cc
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

davidben.cc
davidben.cc(7) : error C3861: '_umul128': identifier not found



But adding -m64 to clang-cl doesn't help (this is with `vcvarsall amd64` again
so that the right link.exe is on the path):

D:\src\llvm-ninja-rel64>bin\clang-cl.exe -m64 davidben.cc
D:\src\llvm-ninja-rel64>bin\clang-cl.exe -m64 davidben.cc
davidben-4d91fd.obj : error LNK2019: unresolved external symbol _umul128
referenced in function main
davidben.exe : fatal error LNK1120: 1 unresolved externals
clang-cl.exe: error: linker command failed with exit code 1120 (use -v to see
invocation)

-- 
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/20141202/d3fb3937/attachment.html>


More information about the llvm-bugs mailing list