[llvm-bugs] [Bug 43610] New: [x86] After r350966, on asm typo, Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 8 10:53:34 PDT 2019


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

            Bug ID: 43610
           Summary: [x86] After r350966, on asm typo, Assertion failed:
                    (isa<X>(Val) && "cast<Ty>() argument of incompatible
                    type!"), function cast
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

After https://reviews.llvm.org/rL350966 ("[X86] Fix incomplete handling of
register-assigned variables in parsing"), a minor typo in assembly, namely
forgetting a comma, leads to an assertion failure:

Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"),
function cast, file /home/dim/src/llvm/trunk/include/llvm/Support/Casting.h,
line 255.
Stack dump:
0.      Program arguments: /home/dim/ins/llvm-trunk-r350966/bin/clang -cc1as
-triple x86_64-- -filetype obj asmtypo.s
0  clang       0x00000000028b14b8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  clang       0x00000000028af3d8 llvm::sys::RunSignalHandlers() + 248
2  clang       0x00000000028b1d58
llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 1272
3  libthr.so.3 0x00000008043d0430 _pthread_sigmask + 1328
Abort trap

Test case:

// clang -cc1as -triple x86_64-- -filetype obj asmtypo.s
movl %ebx %eax

Before r350965, this resulted in a more regular error message:

$ ~/ins/llvm-trunk-r350965/bin/clang -cc1as -triple x86_64-- -filetype obj
asmtypo.s
asmtypo.s:2:11: error: unexpected token in argument list
movl %ebx %eax
          ^

-- 
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/20191008/338559bc/attachment.html>


More information about the llvm-bugs mailing list