[llvm-bugs] [Bug 52043] New: clang on sparc64 generates reference to unknown symbol __muloti4

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 2 13:03:23 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=52043

            Bug ID: 52043
           Summary: clang on sparc64 generates reference to unknown symbol
                    __muloti4
           Product: new-bugs
           Version: trunk
          Hardware: Sun
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikulas at artax.karlin.mff.cuni.cz
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

If you compile the following program with -O2, it will fail to link with
undefined reference to `__muloti4'

The bug happens with clang-14 on Sparc64, installed from Debian ports. It
doesn't happen on x86-64 or arm64.

The bug only happens with clang-14, it doesn't happen with older versions.

#include <stdio.h>

__attribute__((noinline)) int mul(__int128 a, __int128 b, __int128 *r)
{
        *r = (unsigned __int128)a * (unsigned __int128)b;
        return *r / a == b;
}

int main(void)
{
        __int128 r;
        int o;
        o = mul(2, 3, &r);
        printf("%d - %d\n", o, (int)r);
        return 0;
}

-- 
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/20211002/29808c3d/attachment.html>


More information about the llvm-bugs mailing list