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++/96905] [10/11 Regression] ICE with consteval function: internal compiler error: in cp_gimplify_expr, at cp/cp-gimplify.c:827 Date: Thu, 03 Sep 2020 19:26:27 +0000 [thread overview] Message-ID: <bug-96905-4-ZI0dLtlFAH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96905-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96905 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Tried --- gcc/cp/semantics.c.jj 2020-09-01 09:17:50.000000000 +0200 +++ gcc/cp/semantics.c 2020-09-03 21:20:20.678830381 +0200 @@ -4517,7 +4517,7 @@ expand_or_defer_fn_1 (tree fn) return false; } - if (DECL_OMP_DECLARE_REDUCTION_P (fn)) + if (DECL_IMMEDIATE_FUNCTION_P (fn) || DECL_OMP_DECLARE_REDUCTION_P (fn)) return false; return true; --- gcc/cp/decl2.c.jj 2020-07-28 15:39:09.780759362 +0200 +++ gcc/cp/decl2.c 2020-09-03 21:23:15.973278453 +0200 @@ -2172,7 +2172,7 @@ void mark_needed (tree decl) { TREE_USED (decl) = 1; - if (TREE_CODE (decl) == FUNCTION_DECL) + if (TREE_CODE (decl) == FUNCTION_DECL && !DECL_IMMEDIATE_FUNCTION_P (decl)) { /* Extern inline functions don't become needed when referenced. If we know a method will be emitted in other TU and no new --- gcc/cp/pt.c.jj 2020-09-01 09:17:28.042110726 +0200 +++ gcc/cp/pt.c 2020-09-03 21:14:14.497159429 +0200 @@ -23891,8 +23891,10 @@ mark_decl_instantiated (tree result, int { mark_definable (result); mark_needed (result); + if (DECL_IMMEDIATE_FUNCTION_P (result)) + ; /* Always make artificials weak. */ - if (DECL_ARTIFICIAL (result) && flag_weak) + else if (DECL_ARTIFICIAL (result) && flag_weak) comdat_linkage (result); /* For WIN32 we also want to put explicit instantiations in linkonce sections. */ but that is still not enough, the above are just some hacks to avoid creating cgraph nodes for immediate functions, but e.g. c_parse_final_cleanups still creates them.
next prev parent reply other threads:[~2020-09-03 19:26 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-02 19:23 [Bug c++/96905] New: " redi at gcc dot gnu.org 2020-09-02 20:44 ` [Bug c++/96905] " mpolacek at gcc dot gnu.org 2020-09-02 20:48 ` mpolacek at gcc dot gnu.org 2020-09-02 21:07 ` jakub at gcc dot gnu.org 2020-09-03 10:47 ` [Bug c++/96905] [10/11 Regression] " jakub at gcc dot gnu.org 2020-09-03 19:26 ` jakub at gcc dot gnu.org [this message] 2020-10-12 12:25 ` rguenth at gcc dot gnu.org 2021-02-09 1:52 ` cvs-commit at gcc dot gnu.org 2021-02-11 23:10 ` jason at gcc dot gnu.org 2021-02-12 2:30 ` cvs-commit at gcc dot gnu.org 2021-02-12 2:48 ` jason 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-96905-4-ZI0dLtlFAH@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).