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++/107558] [10/11/12/13 Regression] ICE in fld_incomplete_type_of with -fmerge-all-constants and openmp and LTO since r11-16-ga2f32550a085984f Date: Wed, 23 Nov 2022 12:18:28 +0000 [thread overview] Message-ID: <bug-107558-4-UZgoP0Ho8M@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107558-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107558 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The reason is that omp-low.cc creates a pointer to reference type, because an automatic variable with REFERENCE_TYPE is not TREE_READONLY. While we perhaps could tweak all spots in omp-low.cc that reference TREE_READONLY to check also for REFERENCE_TYPE, I think the reason mentioned in r11-16-ga2f32550a085984f is never the case for non-aggregate types. So perhaps instead: --- gcc/cp/decl.cc.jj 2022-11-19 09:21:14.662439877 +0100 +++ gcc/cp/decl.cc 2022-11-23 13:12:31.866553152 +0100 @@ -8679,8 +8679,10 @@ cp_finish_decl (tree decl, tree init, bo if (var_definition_p /* With -fmerge-all-constants, gimplify_init_constructor - might add TREE_STATIC to the variable. */ - && (TREE_STATIC (decl) || flag_merge_constants >= 2)) + might add TREE_STATIC to aggregate variables. */ + && (TREE_STATIC (decl) + || (flag_merge_constants >= 2 + && AGGREGATE_TYPE_P (type)))) { /* If a TREE_READONLY variable needs initialization at runtime, it is no longer readonly and we need to ?
next prev parent reply other threads:[~2022-11-23 12:18 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-07 18:14 [Bug c++/107558] New: [10/11/12/13 Regression] ICE in fld_incomplete_type_of, at ipa-free-lang-data.cc:258 gscfq@t-online.de 2022-11-08 9:30 ` [Bug c++/107558] [10/11/12/13 Regression] ICE in fld_incomplete_type_of with -fmerge-all-constants and openmp and LTO rguenth at gcc dot gnu.org 2022-11-21 12:31 ` [Bug c++/107558] [10/11/12/13 Regression] ICE in fld_incomplete_type_of with -fmerge-all-constants and openmp and LTO since r11-16-ga2f32550a085984f marxin at gcc dot gnu.org 2022-11-23 12:18 ` jakub at gcc dot gnu.org [this message] 2023-01-13 12:41 ` rguenth at gcc dot gnu.org 2023-03-10 19:39 ` cvs-commit at gcc dot gnu.org 2023-03-10 19:46 ` [Bug c++/107558] [10/11/12 " jakub at gcc dot gnu.org 2023-03-19 5:30 ` cvs-commit at gcc dot gnu.org 2023-03-20 10:30 ` [Bug c++/107558] [10/11 " jakub at gcc dot gnu.org 2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org 2023-05-03 9:32 ` [Bug c++/107558] [10 " jakub at gcc dot gnu.org 2023-05-03 15:22 ` cvs-commit at gcc dot gnu.org 2023-05-04 7:21 ` 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-107558-4-UZgoP0Ho8M@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).