[LLVMbugs] [Bug 7738] New: "overloadable" causes assertion failure
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 28 10:59:18 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7738
Summary: "overloadable" causes assertion failure
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sliao at google.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Clang gave me an assertion failure. My input program "test.c" below is very
simple. If I remove the overloadable attribute, then the error goes away.
What's wrong? Thanks.
$ ./clang m2/work/test.c
clang:
/usr/local/google/slang/llvmhost/llvm-102410/include/llvm/Support/Casting.h:202:
typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::FunctionProtoType, Y = const clang::FunctionType*]: Assertion
`isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
0 clang 0x09218958
Stack dump:
0. Program arguments: /usr/local/google/slang0/llvmhost/llvm/bin/clang -cc1
-triple i386-unknown-linux-gnu -S -disable-free -main-file-name test.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu
pentium4 -resource-dir /usr/local/google/slang0/llvmhost/llvm/lib/clang/1.5
-ferror-limit 19 -ftemplate-backtrace-limit 10 -fmessage-length 237
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-zY7tjd.s
-x c m2/work/test.c
1. <eof> parser at end of file
2. m2/work/test.c:3:5: LLVM IR generation of declaration 'root'
3. m2/work/test.c:3:5: Generating code for declaration 'root'
4. m2/work/test.c:4:1: LLVM IR generation of compound statement ('{}')
5. m2/work/test.c:1:42: Mangling declaration 'rsUpdateMills'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)
$ cat test.c
extern int __attribute__((overloadable)) rsUpdateMills();
int root()
{
int i = rsUpdateMills();
return i;
}
--
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