https://llvm.org/bugs/show_bug.cgi?id=28508
Bug ID: 28508 Summary: Assertion failed: !isa<TagDecl>(this) || !cast<TagDecl>(this)->isCompleteDefinition() Product: clang Version: 3.8 Hardware: Other OS: Linux Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: jt...@ca.ibm.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified This problem only happens when I try to compile the test case as a c file using clang, if I compile it as a c++ file using clang++, there is no assertion. Steps to reproduce on linux: -bash-4.2$ cat r.c int main() { typedef char* CHARPT; for (struct CHARPT {int i;} a;;) {} return 55; } -bash-4.2$ clang r.c r.c:4:15: error: declaration of non-local variable in 'for' loop for (struct CHARPT {int i;} a;;) {} ^ clang: /home/jtony/build/3_8/llvm-dev.src/tools/clang/lib/AST/DeclBase.cpp:113: void clang::Decl::setInvalidDecl(bool): Assertion `!isa<TagDecl>(this) || !cast<TagDecl>(this)->isCompleteDefinition()' failed. ... 1. r.c:5:3: current parser token 'return' 2. r.c:2:1: parsing function body 'main' 3. r.c:2:1: in compound statement ('{}') clang: error: unable to execute command: Aborted (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.8.0 (tags/RELEASE_380/final) Target: powerpc64le-unknown-linux-gnu Thread model: posix InstalledDir: /home/jtony/build/runnable/bin -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs