https://llvm.org/bugs/show_bug.cgi?id=25354
Bug ID: 25354 Summary: __restrict__ qualifier applied to ill-formed pointer to reference in function declaration causes ICE Product: clang Version: 3.5 Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: yaghmour.sha...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified The following code see it live http://melpon.org/wandbox/permlink/lgp392JgRKcS5fN3: void func( double &*__restrict__ y){ } causes an ICE and generate the following dump: rog.cc:1:20: error: 'y' declared as a pointer to a reference of type 'double &' void func( double &*__restrict__ y){ ^ 0 clang 0x0000000001e05f52 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 clang 0x0000000001e05afc 2 libpthread.so.0 0x00007fa9df01bcb0 3 clang 0x0000000000d36653 clang::Sema::BuildQualifiedType(clang::QualType, clang::SourceLocation, clang::Qualifiers, clang::DeclSpec const*) + 35 4 clang 0x0000000000d3e40d clang::Sema::BuildQualifiedType(clang::QualType, clang::SourceLocation, unsigned int, clang::DeclSpec const*) + 173 5 clang 0x0000000000d42403 6 clang 0x0000000000d45209 clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) + 345 7 clang 0x0000000000ab265b clang::Sema::ActOnParamDeclarator(clang::Scope*, clang::Declarator&) + 139 8 clang 0x00000000009b3c9b clang::Parser::ParseParameterDeclarationClause(clang::Declarator&, clang::ParsedAttributes&, llvm::SmallVectorImpl<clang::DeclaratorChunk::ParamInfo>&, clang::SourceLocation&) + 1499 9 clang 0x00000000009b4c83 clang::Parser::ParseFunctionDeclarator(clang::Declarator&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&, bool, bool) + 1747 10 clang 0x00000000009b5760 clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 672 11 clang 0x00000000009a757d clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void (clang::Parser::*)(clang::Declarator&)) + 173 12 clang 0x00000000009a80b2 clang::Parser::ParseDeclarator(clang::Declarator&) + 18 13 clang 0x00000000009b1b43 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 627 14 clang 0x000000000099a8e8 clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 280 15 clang 0x000000000099af66 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 966 16 clang 0x000000000099e243 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 259 17 clang 0x000000000099e9dc clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 428 18 clang 0x0000000000998330 clang::ParseAST(clang::Sema&, bool, bool) + 352 19 clang 0x000000000080d4af clang::CodeGenAction::ExecuteAction() + 31 20 clang 0x0000000000695876 clang::FrontendAction::Execute() + 118 21 clang 0x0000000000674830 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 256 22 clang 0x000000000065f7d1 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1921 23 clang 0x000000000065a028 cc1_main(char const**, char const**, char const*, void*) + 984 24 clang 0x000000000064283f main + 8527 25 libc.so.6 0x00007fa9dde2776d __libc_start_main + 237 26 clang 0x0000000000658fc5 Stack dump: 0. Program arguments: /usr/local/llvm-3.5/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name prog.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.22 -dwarf-column-info -nostdinc++ -resource-dir /usr/local/llvm-3.5/bin/../lib/clang/3.5.0 -I /usr/local/libcxx-3.5/include/c++/v1 -internal-isystem /usr/local/include -internal-isystem /usr/local/llvm-3.5/bin/../lib/clang/3.5.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -Wextra -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/jail -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -fansi-escape-codes -o /tmp/prog-ce2f19.o -x c++ prog.cc 1. prog.cc:1:35: current parser token ')' clang: error: unable to execute command: Segmentation fault clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.5.0 (tags/RELEASE_350/final) Target: x86_64-unknown-linux-gnu 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: ******************** I can not reproduce on version 3.6 or above. -- 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