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 middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac
Date: Thu, 23 Feb 2023 15:55:09 +0000	[thread overview]
Message-ID: <bug-108854-4-hhHszIQs2C@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108854-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108854

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the problem is that duplicate_thunk_for_node when copying the
FUNCTION_DECL node doesn't also copy DECL_ARGUMENTS (unless some changes to the
arguments are needed).
--- gcc/cgraphclones.cc.jj      2023-02-22 20:50:27.417519830 +0100
+++ gcc/cgraphclones.cc 2023-02-23 16:02:29.653090584 +0100
@@ -218,7 +218,17 @@ duplicate_thunk_for_node (cgraph_node *t
       body_adj.modify_formal_parameters ();
     }
   else
-    new_decl = copy_node (thunk->decl);
+    {
+      new_decl = copy_node (thunk->decl);
+      for (tree *arg = &DECL_ARGUMENTS (new_decl);
+          *arg; arg = &DECL_CHAIN (*arg))
+       {
+         tree next = DECL_CHAIN (*arg);
+         *arg = copy_node (*arg);
+         DECL_CONTEXT (*arg) = new_decl;
+         DECL_CHAIN (*arg) = next;
+       }
+    }

   gcc_checking_assert (!DECL_STRUCT_FUNCTION (new_decl));
   gcc_checking_assert (!DECL_INITIAL (new_decl));
seems to fix the ICE.

  parent reply	other threads:[~2023-02-23 15:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19 23:53 [Bug c++/108854] New: tbb-2021.8.0 fails on i686-linux (32-bit) gcc.gnu.org+lufm at davidak dot de
2023-02-20  8:34 ` [Bug middle-end/108854] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 rguenth at gcc dot gnu.org
2023-02-20  9:52 ` jakub at gcc dot gnu.org
2023-02-20 12:14 ` redi at gcc dot gnu.org
2023-02-20 23:31 ` pinskia at gcc dot gnu.org
2023-02-20 23:39 ` pinskia at gcc dot gnu.org
2023-02-21 17:00 ` gcc.gnu.org+lufm at davidak dot de
2023-02-21 18:32 ` jakub at gcc dot gnu.org
2023-02-22  9:40 ` slyfox at gcc dot gnu.org
2023-02-22 13:22 ` jakub at gcc dot gnu.org
2023-02-22 15:40 ` [Bug middle-end/108854] [10/11/12/13 Regression] " jakub at gcc dot gnu.org
2023-02-23 15:55 ` jakub at gcc dot gnu.org [this message]
2023-02-23 16:16 ` [Bug middle-end/108854] [10/11/12/13 Regression] tbb-2021.8.0 fails on i686-linux (32-bit), internal compiler error: in expand_expr_real_1, at expr.c:10281 since r10-4511-g6cf67b62c8cda035dccac jakub at gcc dot gnu.org
2023-02-24 10:06 ` cvs-commit at gcc dot gnu.org
2023-02-24 10:07 ` [Bug middle-end/108854] [10/11/12 " jakub at gcc dot gnu.org
2023-03-19  5:29 ` cvs-commit at gcc dot gnu.org
2023-03-20 10:27 ` [Bug middle-end/108854] [10/11 " jakub at gcc dot gnu.org
2023-05-02 20:15 ` cvs-commit at gcc dot gnu.org
2023-05-03 10:39 ` [Bug middle-end/108854] [10 " jakub at gcc dot gnu.org
2023-05-03 15:21 ` cvs-commit at gcc dot gnu.org
2023-05-04  7:25 ` 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-108854-4-hhHszIQs2C@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: link
Be 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).