[libcxx-commits] [PATCH] D96385: [libc++] [P1032] Finish constexpr-ifying <iterator>, <string_view>, <tuple>, <utility>.
Mikael Holmén via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 26 01:36:09 PDT 2021
uabelho added a comment.
Hi,
I noticed that the following test failed with this patch:
Failed Tests (1):
libc++ :: std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
It hits an assertion:
clang-13: /repo/uabelho/master-github/clang/lib/AST/ExprConstant.cpp:5947: bool HandleUnionActiveMemberChange((anonymous namespace)::EvalInfo &, const clang::Expr *, const (anonymous namespace)::LValue &): Assertion `declaresSameEntity(Elt->getType()->getAsCXXRecordDecl(), LHS.Designator.Entries[PathLength] .getAsBaseOrMember().getPointer())' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all --mrelax-relocations -disable-free -main-file-name convert_copy.pass.cpp -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/repo/uabelho/master-github/llvm/build-all-builtins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign -nostdinc++ -resource-dir /repo/uabelho/master-github/llvm/build-all-builtins/lib/clang/13.0.0 -include /repo/uabelho/master-github/llvm/build-all-builtins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/__config_site -include /repo/uabelho/master-github/libcxx/test/support/nasty_macros.h -I /repo/uabelho/master-github/libcxx/include -I /repo/uabelho/master-github/llvm/build-all-builtins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/include/c++build -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I /repo/uabelho/master-github/libcxx/test/support -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D _LIBCPP_DISABLE_AVAILABILITY -D _LIBCPP_HAS_THREAD_API_PTHREAD -D _LIBCPP_ABI_VERSION=1 -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../x86_64-redhat-linux/include -internal-isystem /repo/uabelho/master-github/llvm/build-all-builtins/lib/clang/13.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror -Wall -Wextra -Wshadow -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Werror=thread-safety -Wuser-defined-warnings -Wno-macro-redefined -Wno-macro-redefined -std=c++2b -fdeprecated-macro -fdebug-compilation-dir=/repo/uabelho/master-github/llvm/build-all-builtins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign -ferror-limit 19 -fcoroutines-ts -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/convert_copy-5d8b65.o -x c++ /repo/uabelho/master-github/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp
1. /repo/uabelho/master-github/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp:111:5: current parser token '{'
2. /repo/uabelho/master-github/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp:105:1: parsing function body 'main'
3. /repo/uabelho/master-github/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_copy.pass.cpp:105:1: in compound statement ('{}')
#0 0x0000000002ada0f3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x2ada0f3)
#1 0x0000000002ad7dae llvm::sys::RunSignalHandlers() (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x2ad7dae)
#2 0x0000000002ada5b6 SignalHandler(int) Signals.cpp:0:0
#3 0x00007f8fa58f7630 __restore_rt sigaction.c:0:0
#4 0x00007f8fa302a387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007f8fa302ba78 abort (/lib64/libc.so.6+0x37a78)
#6 0x00007f8fa30231a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#7 0x00007f8fa3023252 (/lib64/libc.so.6+0x2f252)
#8 0x000000000509b722 HandleUnionActiveMemberChange((anonymous namespace)::EvalInfo&, clang::Expr const*, (anonymous namespace)::LValue const&) ExprConstant.cpp:0:0
#9 0x0000000005092a9e HandleFunctionCall(clang::SourceLocation, clang::FunctionDecl const*, (anonymous namespace)::LValue const*, llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, clang::Stmt const*, (anonymous namespace)::EvalInfo&, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#10 0x0000000005099c04 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::LValueExprEvaluator>::VisitCallExpr(clang::CallExpr const*) ExprConstant.cpp:0:0
#11 0x000000000508b200 EvaluateLValue(clang::Expr const*, (anonymous namespace)::LValue&, (anonymous namespace)::EvalInfo&, bool) ExprConstant.cpp:0:0
#12 0x0000000005090aca Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#13 0x0000000005117d34 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::VoidExprEvaluator>::VisitBinaryOperator(clang::BinaryOperator const*) ExprConstant.cpp:0:0
#14 0x00000000050918b3 Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#15 0x0000000005095631 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::LValueExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
#16 0x000000000508b200 EvaluateLValue(clang::Expr const*, (anonymous namespace)::LValue&, (anonymous namespace)::EvalInfo&, bool) ExprConstant.cpp:0:0
#17 0x0000000005090aca Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#18 0x000000000508c907 EvaluateInPlace(clang::APValue&, (anonymous namespace)::EvalInfo&, (anonymous namespace)::LValue const&, clang::Expr const*, bool) ExprConstant.cpp:0:0
#19 0x000000000509081e EvaluateCallArg(clang::ParmVarDecl const*, clang::Expr const*, (anonymous namespace)::CallRef, (anonymous namespace)::EvalInfo&, bool) ExprConstant.cpp:0:0
#20 0x00000000050afe7f EvaluateArgs(llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, (anonymous namespace)::EvalInfo&, clang::FunctionDecl const*, bool) ExprConstant.cpp:0:0
#21 0x0000000005118ca5 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::VoidExprEvaluator>::handleCallExpr(clang::CallExpr const*, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#22 0x0000000005115769 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::VoidExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
#23 0x000000000511619b clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::VoidExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
#24 0x00000000050918b3 Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#25 0x00000000050b4fd7 EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#26 0x00000000050b550a EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#27 0x000000000509289e HandleFunctionCall(clang::SourceLocation, clang::FunctionDecl const*, (anonymous namespace)::LValue const*, llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, clang::Stmt const*, (anonymous namespace)::EvalInfo&, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#28 0x00000000051192d7 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::VoidExprEvaluator>::handleCallExpr(clang::CallExpr const*, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#29 0x0000000005115769 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::VoidExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
#30 0x00000000050918b3 Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#31 0x00000000050b4fd7 EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#32 0x00000000050b550a EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#33 0x000000000509289e HandleFunctionCall(clang::SourceLocation, clang::FunctionDecl const*, (anonymous namespace)::LValue const*, llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, clang::Stmt const*, (anonymous namespace)::EvalInfo&, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#34 0x0000000005099c04 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::LValueExprEvaluator>::VisitCallExpr(clang::CallExpr const*) ExprConstant.cpp:0:0
#35 0x000000000508b200 EvaluateLValue(clang::Expr const*, (anonymous namespace)::LValue&, (anonymous namespace)::EvalInfo&, bool) ExprConstant.cpp:0:0
#36 0x0000000005090aca Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#37 0x00000000050b4fd7 EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#38 0x00000000050b550a EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#39 0x00000000050b550a EvaluateStmt((anonymous namespace)::StmtResult&, (anonymous namespace)::EvalInfo&, clang::Stmt const*, clang::SwitchCase const*) ExprConstant.cpp:0:0
#40 0x000000000509289e HandleFunctionCall(clang::SourceLocation, clang::FunctionDecl const*, (anonymous namespace)::LValue const*, llvm::ArrayRef<clang::Expr const*>, (anonymous namespace)::CallRef, clang::Stmt const*, (anonymous namespace)::EvalInfo&, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#41 0x00000000050eb527 (anonymous namespace)::ExprEvaluatorBase<(anonymous namespace)::IntExprEvaluator>::handleCallExpr(clang::CallExpr const*, clang::APValue&, (anonymous namespace)::LValue const*) ExprConstant.cpp:0:0
#42 0x00000000050c38b8 clang::StmtVisitorBase<llvm::make_const_ptr, (anonymous namespace)::IntExprEvaluator, bool>::Visit(clang::Stmt const*) ExprConstant.cpp:0:0
#43 0x0000000005090ca8 Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) ExprConstant.cpp:0:0
#44 0x000000000508e130 EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) ExprConstant.cpp:0:0
#45 0x000000000508a2ce clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&, bool) const (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x508a2ce)
#46 0x00000000047ebcb2 clang::Sema::VerifyIntegerConstantExpression(clang::Expr*, llvm::APSInt*, clang::Sema::VerifyICEDiagnoser&, clang::Sema::AllowFoldKind) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x47ebcb2)
#47 0x00000000047e9675 clang::Sema::VerifyIntegerConstantExpression(clang::Expr*, llvm::APSInt*, unsigned int, clang::Sema::AllowFoldKind) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x47e9675)
#48 0x00000000047361a9 clang::Sema::BuildStaticAssertDeclaration(clang::SourceLocation, clang::Expr*, clang::StringLiteral*, clang::SourceLocation, bool) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x47361a9)
#49 0x0000000004475bf8 clang::Parser::ParseStaticAssertDeclaration(clang::SourceLocation&) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x4475bf8)
#50 0x0000000004453815 clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, clang::SourceLocation*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x4453815)
#51 0x00000000044f4fbd clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x44f4fbd)
#52 0x00000000044f3f41 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x44f3f41)
#53 0x00000000044fde01 clang::Parser::ParseCompoundStatementBody(bool) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x44fde01)
#54 0x00000000044ff055 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x44ff055)
#55 0x0000000004439efd clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x4439efd)
#56 0x000000000445a096 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x445a096)
#57 0x0000000004439095 clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x4439095)
#58 0x0000000004438af5 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x4438af5)
#59 0x00000000044379d6 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x44379d6)
#60 0x000000000443578d clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x443578d)
#61 0x000000000442fd48 clang::ParseAST(clang::Sema&, bool, bool) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x442fd48)
#62 0x00000000033796f3 clang::FrontendAction::Execute() (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x33796f3)
#63 0x00000000032f0474 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x32f0474)
#64 0x000000000342aad1 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x342aad1)
#65 0x00000000009de555 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x9de555)
#66 0x00000000009dc991 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#67 0x00000000009dc44c main (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x9dc44c)
#68 0x00007f8fa3016555 __libc_start_main (/lib64/libc.so.6+0x22555)
#69 0x00000000009d93bd _start (/repo/uabelho/master-github/llvm/build-all-builtins/bin/clang-13+0x9d93bd)
clang-13: error: unable to execute command: Aborted
clang-13: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 13.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96385/new/
https://reviews.llvm.org/D96385
More information about the libcxx-commits
mailing list