[llvm-bugs] [Bug 31615] New: Brackets inside inline asm crash backend

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 12 01:17:57 PST 2017


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

            Bug ID: 31615
           Summary: Brackets inside inline asm crash backend
           Product: new-bugs
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: pmatos at linki.tools
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following code snippet crashs the backend:

// inlbra2.c
void foo() { __asm__("#{{[a-zA-Z]}}":::"memory"); }
int main(void) { return 0; }

Try:
$ ~/INSTALLS/clang+llvm-3.9.0-x86_64-fedora23/bin/clang -S -o- inbra2.c 
        .text
        .file   "inbra2.c"
        .globl  foo
        .p2align        4, 0x90
        .type   foo, at function
foo:                                    # @foo
        .cfi_startproc
# BB#0:
        pushq   %rbp
.Ltmp0:
        .cfi_def_cfa_offset 16
.Ltmp1:
        .cfi_offset %rbp, -16
        movq    %rsp, %rbp
.Ltmp2:
        .cfi_def_cfa_register %rbp
        #APP
fatal error: error in backend: Nested variants found in inline asm string:
'#$($([a-zA-Z]$)$)'
clang-3.9: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 3.9.0 (tags/RELEASE_390/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/pmatos/INSTALLS/clang+llvm-3.9.0-x86_64-fedora23/bin
clang-3.9: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.9: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.9: note: diagnostic msg: /tmp/inbra2-2cc6fb.c
clang-3.9: note: diagnostic msg: /tmp/inbra2-2cc6fb.sh
clang-3.9: note: diagnostic msg: 

********************

-- 
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/20170112/c77eb5da/attachment-0001.html>


More information about the llvm-bugs mailing list