[LLVMbugs] [Bug 23089] New: "Non-type attribute not handled" assertion on [[clang::fallthrough]] on regular variable

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 31 13:35:11 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23089

            Bug ID: 23089
           Summary: "Non-type attribute not handled" assertion on
                    [[clang::fallthrough]] on regular variable
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat test.cc
[[clang::fallthrough]] int x;
$ bin/clang -c test.cc -std=c++11
Assertion failed: (Attr.isTypeAttr() && "Non-type attribute not handled"),
function ProcessDeclAttribute, file
/Users/thakis/src/llvm-svn/tools/clang/lib/Sema/SemaDeclAttr.cpp, line 4360.
0  clang-3.7                0x000000010f7dc1b9
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57
1  clang-3.7                0x000000010f7dcb8b SignalHandler(int) + 571
2  libsystem_platform.dylib 0x00007fff946035aa _sigtramp + 26
3  libsystem_platform.dylib 000000000000000000 _sigtramp + 1805634160
4  clang-3.7                0x000000010f7dc936 abort + 22
5  clang-3.7                0x000000010f7dc911 __assert_rtn + 81
6  clang-3.7                0x000000011046b128
ProcessDeclAttribute(clang::Sema&, clang::Scope*, clang::Decl*,
clang::AttributeList const&, bool) + 85336
7  clang-3.7                0x0000000110455d04
clang::Sema::ProcessDeclAttributeList(clang::Scope*, clang::Decl*,
clang::AttributeList const*, bool) + 84
8  clang-3.7                0x000000011046c304
clang::Sema::ProcessDeclAttributes(clang::Scope*, clang::Decl*,
clang::Declarator const&) + 52
9  clang-3.7                0x0000000110424b0e
clang::Sema::ActOnVariableDeclarator(clang::Scope*, clang::Declarator&,
clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&,
llvm::MutableArrayRef<clang::TemplateParameterList*>, bool&) + 9230
10 clang-3.7                0x000000011041a9e2
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 2898
11 clang-3.7                0x0000000110419e3a
clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) + 26
12 clang-3.7                0x000000011018fd6b
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 299
13 clang-3.7                0x000000011018e5fa
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 3130
14 clang-3.7                0x0000000110213294
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 692
15 clang-3.7                0x0000000110212c67
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 375
16 clang-3.7                0x0000000110211c0c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2636
17 clang-3.7                0x0000000110211087
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 487
18 clang-3.7                0x000000011017b377 clang::ParseAST(clang::Sema&,
bool, bool) + 247
19 clang-3.7                0x000000010fdc0f4b
clang::CodeGenAction::ExecuteAction() + 123
20 clang-3.7                0x000000010f9fed23 clang::FrontendAction::Execute()
+ 67
21 clang-3.7                0x000000010f9ce51c
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 972
22 clang-3.7                0x000000010fa3f995
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4149
23 clang-3.7                0x000000010e819a7c cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1068
24 clang-3.7                0x000000010e818739 main + 11385
25 libdyld.dylib            0x00007fff950c05fd start + 1
Stack dump:
0.    Program arguments: /Volumes/MacintoshHD2/src/llvm-build/bin/clang-3.7
-cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free
-main-file-name test.cc -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 241.9 -dwarf-column-info -coverage-file
/Users/thakis/src/llvm-build/test.cc -resource-dir
/Volumes/MacintoshHD2/src/llvm-build/bin/../lib/clang/3.7.0 -stdlib=libc++
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/Users/thakis/src/llvm-build -ferror-limit 19 -fmessage-length 392
-stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o test.o -x
c++ test.cc 
1.    test.cc:1:29: current parser token ';'
clang-3.7: error: unable to execute command: Illegal instruction: 4
clang-3.7: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk 232739)

-- 
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/20150331/5c483198/attachment.html>


More information about the llvm-bugs mailing list