[LLVMbugs] [Bug 19199] New: Clang 3.5 crash llvm/tools/clang/lib/AST/Decl.cpp:1687: bool isExternCTemplate(const T &) [T = clang::VarDecl]: Assertion `D.getASTContext().getLangOpts().CPlusPlus' failed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Mar 19 13:00:13 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19199
Bug ID: 19199
Summary: Clang 3.5 crash
llvm/tools/clang/lib/AST/Decl.cpp:1687: bool
isExternCTemplate(const T &) [T = clang::VarDecl]:
Assertion `D.getASTContext().getLangOpts().CPlusPlus'
failed
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: julien.grall at linaro.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 12258
--> http://llvm.org/bugs/attachment.cgi?id=12258&action=edit
Preprocessed source
I'm trying to compile Xen on ARM with clang 3.5 and I'm run on some assert from
the compiler (see output log below).
I was able to narrow down until this small source code:
int main(void)
{
#define mcurrent *({ unsigned long __ptr; NULL; })
struct { _Static_assert(!(__builtin_types_compatible_p(typeof(*mcurrent),
int))) };
return 0;
}
Compiling the code without any specific argument on clang command line will
result the same issue.
clang: /local/home/julien/works/clang/llvm/tools/clang/lib/AST/Decl.cpp:1687:
bool isExternCTemplate(const T &) [T = clang::VarDecl]: Assertion
`D.getASTContext().getLangOpts().CPlusPlus' failed.
0 clang 0x0a287d39 llvm::sys::PrintStackTrace(_IO_FILE*) + 41
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
armv7--linux-gnueabihf -S -disable-free -main-file-name kernel.c
-mrelocation-model static -mdisable-fp-elim -relaxed-aliasing -fmath-errno
-masm-verbose -no-integrated-as -mconstructor-aliases -target-cpu cortex-a15
-target-feature +soft-float -target-feature +soft-float-abi -target-feature
-neon -target-feature -crypto -target-abi aapcs-linux -msoft-float -mfloat-abi
soft -target-linker-version 2.22 -g -coverage-file /tmp/kernel-23b11f.s
-nostdsysteminc -nobuiltininc -resource-dir /usr/local/bin/../lib/clang/3.5.0
-dependency-file .kernel.o.d -MT kernel.o -include
/local/home/julien/works/arndale/xen/xen/include/xen/config.h -D
GCC_HAS_VISIBILITY_ATTRIBUTE -D __XEN__ -D VERBOSE -D HAS_DEVICE_TREE -D
CONFIG_FRAME_POINTER -I /local/home/julien/works/arndale/xen/xen/include -O1
-Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wnested-externs
-Werror -Wredundant-decls -Wno-pointer-arith -Wno-parentheses -Wno-format
-Wno-unused-value -Wno-initializer-overrides -std=gnu99
-fno-dwarf-directory-asm -fdebug-compilation-dir
/local/home/julien/works/arndale/xen/xen/common -ferror-limit 19
-fmessage-length 319 -mstackrealign -fno-builtin -fno-signed-char
-fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-slp -o /tmp/kernel-23b11f.s -x c kernel.c
1. kernel.c:244:68 <Spelling=kernel.c:243:41>: current parser token ';'
2. kernel.c:225:1: parsing function body 'do_xen_version'
3. kernel.c:225:1: in compound statement ('{}')
4. kernel.c:244:5: parsing struct/union body
5. kernel.c:244:68 <Spelling=kernel.c:243:20>: in compound statement
('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5.0 (http://llvm.org/git/clang.git
bcbb92d12f871a8f927c7f1cfcb45fbd859c8369) (http://llvm.org/git/llvm.git
133aacf0dd1d7d8c7828594e5cd2e9595e0331ed)
Target: arm--linux-gnueabihf
Thread model: posix
clang: 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: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/kernel-ec59a6.c
clang: note: diagnostic msg: /tmp/kernel-ec59a6.sh
clang: 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/20140319/ef2683b0/attachment.html>
More information about the llvm-bugs
mailing list