invalid-float-accessor.cpp:1:46: error: non-void function 'Fun' should return a value [-Wreturn-type] template constexpr T Fun(T A) { return; } ^ invalid-float-accessor.cpp:2:21: note: in instantiation of function template specialization 'Fun' requested here constexpr int Var = Fun(2.) ^ clang-3.6: /home/sliedes/projects/llvm/llvm.src/tools/clang/include/clang/AST/APValue.h:209: APFloat &clang::APValue::getFloat(): Assertion `isFloat() && "Invalid accessor"' failed. #0 0x7f298e965130 llvm::sys::PrintStackTrace(_IO_FILE*) /home/sliedes/projects/llvm/llvm.src/lib/Support/Unix/Signals.inc:422:15 #1 0x7f298e96aed3 SignalHandler(int) /home/sliedes/projects/llvm/llvm.src/lib/Support/Unix/Signals.inc:198:3 #2 0x7f298c227180 (/lib/x86_64-linux-gnu/libc.so.6+0x35180) #3 0x7f298c227107 gsignal /build/glibc-NmptCx/glibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0 #4 0x7f298c2284e8 abort /build/glibc-NmptCx/glibc-2.19/stdlib/abort.c:91:0 #5 0x7f298c220226 __assert_fail_base /build/glibc-NmptCx/glibc-2.19/assert/assert.c:92:0 #6 0x7f298c2202d2 (/lib/x86_64-linux-gnu/libc.so.6+0x2e2d2) #7 0x7f29894cedf7 llvm::isa_impl_cl::doit(clang::FunctionDecl const*) /home/sliedes/projects/llvm/llvm.src/tools/clang/include/clang/AST/APValue.h:209:5 #8 0x7f29894cedf7 llvm::isa_impl_wrap::doit(clang::FunctionDecl const* const&) /home/sliedes/projects/llvm/llvm.src/include/llvm/Support/Casting.h:122:0 #9 0x7f29894cedf7 llvm::isa_impl_wrap::doit(clang::FunctionDecl const* const&) /home/sliedes/projects/llvm/llvm.src/include/llvm/Support/Casting.h:112:0 #10 0x7f29894cedf7 bool llvm::isa(clang::FunctionDecl const* const&) /home/sliedes/projects/llvm/llvm.src/include/llvm/Support/Casting.h:133:0 #11 0x7f29894cedf7 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::FloatExprEvaluator>::VisitCallExpr(clang::CallExpr const*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/ExprConstant.cpp:4148:0 #12 0x7f29894cedf7 (anonymous namespace)::FloatExprEvaluator::VisitCallExpr(clang::CallExpr const*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/ExprConstant.cpp:7580:0 #13 0x7f29894c462b clang::StmtVisitorBase::Visit(clang::Stmt const*) /home/sliedes/scratch/build/llvm-rel-assert-afl.ninja/tools/clang/include/clang/AST/StmtNodes.inc:299:1 #14 0x7f29894c1968 (anonymous namespace)::IntExprEvaluator::VisitCastExpr(clang::CastExpr const*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/ExprConstant.cpp:7463:10 #15 0x7f298948b873 clang::StmtVisitorBase::VisitImplicitCastExpr(clang::ImplicitCastExpr const*) /home/sliedes/scratch/build/llvm-rel-assert-afl.ninja/tools/clang/include/clang/AST/StmtNodes.inc:393:1 #16 0x7f298948b873 clang::StmtVisitorBase::Visit(clang::Stmt const*) /home/sliedes/scratch/build/llvm-rel-assert-afl.ninja/tools/clang/include/clang/AST/StmtNodes.inc:393:0 #17 0x7f298946ed60 Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/ExprConstant.cpp:8313:10 #18 0x7f2989462f36 EvaluateInPlace(clang::APValue&, (anonymous namespace)::EvalInfo&, (anonymous namespace)::LValue const&, clang::Expr const*, bool) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/ExprConstant.cpp:8390:10 #19 0x7f298946226e clang::Expr::EvaluateAsInitializer(clang::APValue&, clang::ASTContext const&, clang::VarDecl const*, llvm::SmallVectorImpl >&) const /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/ExprConstant.cpp:8524:8 #20 0x7f29892ca18e clang::VarDecl::evaluateValue(llvm::SmallVectorImpl >&) const /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/AST/Decl.cpp:2068:7 #21 0x7f29872f29b9 clang::Sema::CheckCompleteVariableDeclaration(clang::VarDecl*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Sema/SemaDecl.cpp:9510:12 #22 0x7f29872ec41b clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Sema/SemaDecl.cpp:9037:3 #23 0x7f298850b2a8 clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/ParseDecl.cpp:1933:9 #24 0x7f2988501c69 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool, clang::SourceLocation*, clang::Parser::ForRangeInit*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/ParseDecl.cpp:1698:21 #25 0x7f29886d90e0 clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/Parser.cpp:893:10 #26 0x7f29886d76ba clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/Parser.cpp:909:12 #27 0x7f29886d492b clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/Parser.cpp:637:12 #28 0x7f29886d1431 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/Parser.cpp:569:12 #29 0x7f29884b7c93 clang::ParseAST(clang::Sema&, bool, bool) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Parse/ParseAST.cpp:145:15 #30 0x7f298d205b81 clang::FrontendAction::Execute() /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Frontend/FrontendAction.cpp:428:8 #31 0x7f298d158488 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/Frontend/CompilerInstance.cpp:804:7 #32 0x7f298cdc22c3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/sliedes/projects/llvm/llvm.src/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:222:18 #33 0x420258 cc1_main(llvm::ArrayRef, char const*, void*) /home/sliedes/projects/llvm/llvm.src/tools/clang/tools/driver/cc1_main.cpp:110:13 #34 0x419925 ExecuteCC1Tool(llvm::ArrayRef, llvm::StringRef) /home/sliedes/projects/llvm/llvm.src/tools/clang/tools/driver/driver.cpp:369:12 #35 0x419925 main /home/sliedes/projects/llvm/llvm.src/tools/clang/tools/driver/driver.cpp:415:0 #36 0x7f298c213b45 __libc_start_main /build/glibc-NmptCx/glibc-2.19/csu/libc-start.c:321:0 #37 0x40b328 _start (/home/sliedes/local/llvm-trunk-rel/bin/clang-3.6+0x40b328) Stack dump: 0. Program arguments: /home/sliedes/local/llvm-trunk-rel/bin/clang-3.6 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name invalid-float-accessor.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -resource-dir /home/sliedes/local/llvm-trunk-rel/bin/../lib/clang/3.6.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward -internal-isystem /usr/local/include -internal-isystem /home/sliedes/local/llvm-trunk-rel/bin/../lib/clang/3.6.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /home/sliedes/t/clang/bug/min -ferror-limit 19 -fmessage-length 0 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o /tmp/invalid-float-accessor-792ef7.o -x c++ invalid-float-accessor.cpp 1. parser at end of file clang-3.6: error: unable to execute command: Aborted clang-3.6: error: clang frontend command failed due to signal (use -v to see invocation)