[LLVMbugs] [Bug 3905] New: An incorrect asm statement causes an assert in clang.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Mar 29 13:41:14 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=3905
Summary: An incorrect asm statement causes an assert in clang.
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
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
Created an attachment (id=2774)
--> (http://llvm.org/bugs/attachment.cgi?id=2774)
An inline asm that causes an assert.
The attached file with an incorrect asm statement causes an assertion.
gcc output:
[~/ellcc/ellcc] main% gcc test.c
test.c: In function ‘main’:
test.c:4: error: matching constraint references invalid operand number
test.c:4: error: matching constraint references invalid operand number
[~/ellcc/ellcc] main%
ellcc output:
[~/ellcc/ellcc] main% ./x86-elf-ecc test.c
test.c:4:44: error: the matching constraint 'foo' is different than the
previous matching constraint
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-5iJ1qe.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%
--
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