public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit 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: Fri, 10 Mar 2023 19:39:08 +0000 [thread overview] Message-ID: <bug-107558-4-Jnda7mDWH7@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 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:60b6f5c0a334db3f8f6dffaf0b9aab42fd5c54a2 commit r13-6597-g60b6f5c0a334db3f8f6dffaf0b9aab42fd5c54a2 Author: Jakub Jelinek <jakub@redhat.com> Date: Fri Mar 10 20:38:13 2023 +0100 c++: Don't clear TREE_READONLY for -fmerge-all-constants for non-aggregates [PR107558] The following testcase ICEs, because OpenMP lowering for shared clause on l variable with REFERENCE_TYPE creates POINTER_TYPE to REFERENCE_TYPE. The reason is that the automatic variable has non-trivial construction (reference to a lambda) and -fmerge-all-constants is on and so TREE_READONLY isn't set - omp-low will handle automatic TREE_READONLY vars in shared specially and only copy to the construct and not back, while !TREE_READONLY are assumed to be changeable. The PR91529 change rationale was that the gimplification can change some non-addressable automatic variables to TREE_STATIC with -fmerge-all-constants and therefore TREE_READONLY on them is undesirable. But, the gimplifier does that only for aggregate variables: switch (TREE_CODE (type)) { case RECORD_TYPE: case UNION_TYPE: case QUAL_UNION_TYPE: case ARRAY_TYPE: and not for anything else. So, I think clearing TREE_READONLY for automatic integral or reference or pointer etc. vars for -fmerge-all-constants only is unnecessary. 2023-03-10 Jakub Jelinek <jakub@redhat.com> PR c++/107558 * decl.cc (cp_finish_decl): Don't clear TREE_READONLY on automatic non-aggregate variables just because of -fmerge-all-constants. * g++.dg/gomp/pr107558.C: New test.
next prev parent reply other threads:[~2023-03-10 19:39 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 2023-01-13 12:41 ` rguenth at gcc dot gnu.org 2023-03-10 19:39 ` cvs-commit at gcc dot gnu.org [this message] 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-Jnda7mDWH7@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).