[LLVMbugs] [Bug 1751] New: Compiling init/main. c from Linux kernel aborts with assertion in Casting.h
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Oct 28 13:14:03 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1751
Summary: Compiling init/main.c from Linux kernel aborts with
assertion in Casting.h
Product: cfe
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
$ llvm-gcc -E -Wp,-MD,init/.main.o.d -nostdinc -isystem
/home/edwin/install/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.2.1/include
-D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -O2 -march=k8 -m64 -mno-red-zone
-mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables
-funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
-fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement
-Wno-pointer-sign -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(main)" -D"KBUILD_MODNAME=KBUILD_STR(main)"
init/main.c >main.i
$ clang main.i
clang: /home/edwin/llvm-svn/llvm/include/llvm/Support/Casting.h:199: typename
llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X =
clang::TypedefType, Y = const clang::Type*]: Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed.
clang[0x788b46]
clang[0x788db2]
/lib/libc.so.6[0x32d1c31710]
/lib/libc.so.6(gsignal+0x35)[0x32d1c316a5]
/lib/libc.so.6(abort+0x110)[0x32d1c33100]
/lib/libc.so.6(__assert_fail+0xef)[0x32d1c2ac2f]
clang(llvm::cast_retty<clang::TypedefType, clang::Type const*>::ret_type
llvm::cast<clang::TypedefType, clang::Type const*>(clang::Type const*
const&)+0x44)[0x6718b4]
clang(clang::Type::getAsPointerType() const+0x4c)[0x66f738]
clang(clang::Sema::CheckPointerTypesForAssignment(clang::QualType,
clang::QualType)+0x55)[0x632fbb]
clang(clang::Sema::CheckAssignmentConstraints(clang::QualType,
clang::QualType)+0x1b7)[0x6332db]
clang(clang::Sema::CheckSingleAssignmentConstraints(clang::QualType,
clang::Expr*&)+0x55)[0x6336b9]
clang(clang::Sema::CheckSingleInitializer(clang::Expr*&, bool,
clang::QualType)+0x136)[0x62661a]
clang(clang::Sema::CheckInitializer(clang::Expr*&, clang::QualType&,
bool)+0x49)[0x626df7]
clang(clang::Sema::AddInitializerToDecl(void*, void*)+0x123)[0x627151]
clang(clang::Parser::ParseInitDeclaratorListAfterFirstDeclarator(clang::Declarator&)+0x147)[0x678e57]
clang(clang::Parser::ParseSimpleDeclaration(unsigned int)+0xcc)[0x67901c]
clang(clang::Parser::ParseDeclaration(unsigned int)+0x41)[0x679083]
clang(clang::Parser::ParseStatementOrDeclaration(bool)+0x307)[0x685f49]
clang(clang::Parser::ParseCompoundStatementBody(bool)+0x7c)[0x688ae0]
clang(clang::Parser::ParseFunctionDefinition(clang::Declarator&)+0x156)[0x6743c2]
clang(clang::Parser::ParseDeclarationOrFunctionDefinition()+0x2ca)[0x674748]
clang(clang::Parser::ParseExternalDeclaration()+0x213)[0x674c59]
clang(clang::Parser::ParseTopLevelDecl(void*&)+0x43)[0x674ca7]
clang[0x61d081]
clang(clang::ParseAST(clang::Preprocessor&, unsigned int, clang::ASTConsumer&,
bool)+0xeb)[0x61d221]
clang[0x5e247c]
clang(main+0x335)[0x5e3e57]
/lib/libc.so.6(__libc_start_main+0xf4)[0x32d1c1db44]
clang[0x5c9f99]
Aborted
--
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