public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114426] [14 regression] ICE when building log4cxx on arm (cxx_eval_call_expression, at cp/constexpr.cc:3242) since r14-6507 Date: Fri, 12 Apr 2024 09:59:39 +0000 [thread overview] Message-ID: <bug-114426-4-NHERLUordn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114426-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114426 --- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Actually I had another look. Jason said in the c++: fix in-charge parm in constexpr mail back in December (as well as in the r14-6507 commit message): "Since a class with vbases can't have constexpr 'tors there isn't actually a need for an in-charge parameter in a destructor" but the ICE is because the destructor is marked implicitly constexpr. https://eel.is/c++draft/dcl.constexpr#3.2 says that a destructor of a class with virtual bases is not constexpr-suitable, but we were actually implementing this just for constructors, so clearly my fault from the https://wg21.link/P0784R7 implementation. That paper clearly added that sentence in there and removed similar sentence just from the constructor case. --- gcc/cp/constexpr.cc.jj 2024-04-09 09:29:04.708521907 +0200 +++ gcc/cp/constexpr.cc 2024-04-12 11:45:08.845476718 +0200 @@ -262,18 +262,15 @@ is_valid_constexpr_fn (tree fun, bool co inform (DECL_SOURCE_LOCATION (fun), "lambdas are implicitly %<constexpr%> only in C++17 and later"); } - else if (DECL_DESTRUCTOR_P (fun)) + else if (DECL_DESTRUCTOR_P (fun) && cxx_dialect < cxx20) { - if (cxx_dialect < cxx20) - { - ret = false; - if (complain) - error_at (DECL_SOURCE_LOCATION (fun), - "%<constexpr%> destructors only available" - " with %<-std=c++20%> or %<-std=gnu++20%>"); - } + ret = false; + if (complain) + error_at (DECL_SOURCE_LOCATION (fun), + "%<constexpr%> destructors only available with " + "%<-std=c++20%> or %<-std=gnu++20%>"); } - else if (!DECL_CONSTRUCTOR_P (fun)) + else if (!DECL_CONSTRUCTOR_P (fun) && !DECL_DESTRUCTOR_P (fun)) { tree rettype = TREE_TYPE (TREE_TYPE (fun)); if (!literal_type_p (rettype)) patch fixes the ICE too, just will need to add testcase coverage and see what regresses in the testsuite...
next prev parent reply other threads:[~2024-04-12 9:59 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-22 5:11 [Bug c++/114426] New: [14 regression] ICE when building log4cxx on arm (cxx_eval_call_expression, at cp/constexpr.cc:3242) sjames at gcc dot gnu.org 2024-03-22 5:12 ` [Bug c++/114426] " sjames at gcc dot gnu.org 2024-03-22 5:13 ` sjames at gcc dot gnu.org 2024-03-22 5:14 ` sjames at gcc dot gnu.org 2024-03-22 6:51 ` rguenth at gcc dot gnu.org 2024-03-22 7:26 ` pinskia at gcc dot gnu.org 2024-03-22 8:01 ` sjames at gcc dot gnu.org 2024-03-22 12:36 ` law at gcc dot gnu.org 2024-03-22 15:11 ` [Bug c++/114426] [14 regression] ICE when building log4cxx on arm (cxx_eval_call_expression, at cp/constexpr.cc:3242) since r14-6507 jakub at gcc dot gnu.org 2024-03-22 15:50 ` jakub at gcc dot gnu.org 2024-03-22 15:52 ` jakub at gcc dot gnu.org 2024-03-23 8:06 ` jakub at gcc dot gnu.org 2024-04-10 8:02 ` rguenth at gcc dot gnu.org 2024-04-12 9:59 ` jakub at gcc dot gnu.org [this message] 2024-04-12 17:58 ` cvs-commit at gcc dot gnu.org 2024-04-12 17:58 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-114426-4-NHERLUordn@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).