[LLVMbugs] [Bug 3904] New: An incorrect asm statement causes an assert.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Mar 29 13:27:01 PDT 2009


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

           Summary: An incorrect asm statement causes an assert.
           Product: new-bugs
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: rich at pennware.com
                CC: llvmbugs at cs.uiuc.edu


The attached program triggers an assert.

gcc output:
[~/ellcc/ellcc] main% gcc test.c
test.c: In function ‘main’:
test.c:4: error: inconsistent operand constraints in an ‘asm’
[~/ellcc/ellcc] main%

ellcc output:
[~/ellcc/ellcc] main% ./x86-elf-ecc test.c
test.c:4:38: error: the matched constraint '0' is defined as '+' and should be
'='
typechecking results:
  errors:   1
  warnings: 0
[~/ellcc/ellcc] main%

clang output:
[~/ellcc/ellcc] main% ~/llvm-build/Debug/bin/clang test.c
clang-cc: /home/rich/llvm-trunk-new/lib/VMCore/InlineAsm.cpp:43:
llvm::InlineAsm::InlineAsm(const llvm::FunctionType*, const std::string&, const
std::string&, bool): Assertion `Verify(Ty, constraints) && "Function type not
legal for constraints!"' failed.
0   clang-cc  0x08e3f8e5
1   clang-cc  0x08e3fe17
2             0x00110400 __kernel_sigreturn + 0
3   libc.so.6 0x00bcce28 abort + 392
4   libc.so.6 0x00bc440e __assert_fail + 238
5   clang-cc  0x08d9d47f
6   clang-cc  0x08d9d4d2
7   clang-cc  0x081539fe
8   clang-cc  0x0815462b
9   clang-cc  0x08155a3a
10  clang-cc  0x08155c2f
11  clang-cc  0x081543d9
12  clang-cc  0x0815cfc1
13  clang-cc  0x080d6bb2
14  clang-cc  0x080d6c82
15  clang-cc  0x080d6e5f
16  clang-cc  0x080d710a
17  clang-cc  0x080d2935
18  clang-cc  0x0807c6d6
19  clang-cc  0x0821fff2
20  clang-cc  0x080c6b92
21  clang-cc  0x080c9357 main + 2081
22  libc.so.6 0x00bb66e5 __libc_start_main + 229
23  clang-cc  0x08064d61
Stack dump:
0.      Program arguments: /home/rich/llvm-build/Debug/bin/clang-cc -S
-disable-free --relocation-model static --disable-fp-elim --unwind-tables=0
--fmath-errno=1 -arch i386 -o /tmp/cc-OQGShO.s -x c test.c
1.      <eof> parser at end of file
2.      test.c:1:5: LLVM IR generation of declaration 'main'
3.      test.c:2:1: LLVM IR generation of compound statement ('{}')
[~/ellcc/ellcc] main%

Probably not what you want.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list