public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/109607] IPA replaces stmt with invalid gimple Date: Mon, 24 Apr 2023 12:57:42 +0000 [thread overview] Message-ID: <bug-109607-4-QEXUW7cNOW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109607-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109607 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-04-24 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- #0 ipa_param_body_adjustments::modify_expression (this=0x4b1f040, expr_p=0x7ffff37222b8, convert=true) at /space/rguenther/src/gcc/gcc/ipa-param-manipulation.cc:1867 #1 0x00000000016f7dc5 in ipa_param_body_adjustments::modify_assignment ( this=0x4b1f040, stmt=<gimple_assign 0x7ffff33ecdc0>, extra_stmts=0x7fffffffd0a8) at /space/rguenther/src/gcc/gcc/ipa-param-manipulation.cc:1890 #2 0x00000000016f927a in ipa_param_body_adjustments::modify_gimple_stmt ( this=0x4b1f040, stmt=0x7fffffffd168, extra_stmts=0x7fffffffd0a8, orig_stmt=<gimple_assign 0x7ffff37fa320>) at /space/rguenther/src/gcc/gcc/ipa-param-manipulation.cc:2273 #3 0x0000000001abb925 in remap_gimple_stmt ( stmt=<gimple_assign 0x7ffff37fa320>, id=0x7fffffffd730) at /space/rguenther/src/gcc/gcc/tree-inline.cc:1961 Supposedly the easiest would be to make any is_gimple_reg_type IPA SRA replacement (I suppose all are ...) either address-taken or DECL_NOT_GIMPLE_REG_P. diff --git a/gcc/ipa-param-manipulation.cc b/gcc/ipa-param-manipulation.cc index 42488ee09c3..473d759f983 100644 --- a/gcc/ipa-param-manipulation.cc +++ b/gcc/ipa-param-manipulation.cc @@ -1384,6 +1384,8 @@ ipa_param_body_adjustments::common_initialization (tree old_fndecl, DECL_CONTEXT (new_parm) = m_fndecl; TREE_USED (new_parm) = 1; DECL_IGNORED_P (new_parm) = 1; + if (is_gimple_reg_type (new_type)) + DECL_NOT_GIMPLE_REG_P (new_parm) = 1; layout_decl (new_parm, 0); m_new_decls.quick_push (new_parm); seems to work on the testcase I have.
next prev parent reply other threads:[~2023-04-24 12:57 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-24 12:53 [Bug ipa/109607] New: " rguenth at gcc dot gnu.org 2023-04-24 12:57 ` rguenth at gcc dot gnu.org [this message] 2023-04-26 11:05 ` [Bug ipa/109607] " rguenth at gcc dot gnu.org 2023-04-26 13:16 ` jamborm at gcc dot gnu.org 2023-04-27 10:31 ` cvs-commit at gcc dot gnu.org 2023-04-27 10:31 ` rguenth 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-109607-4-QEXUW7cNOW@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).