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/109652] [14 Regression] ICE on valgrind-3.20.0: in modify_expression, at ipa-param-manipulation.cc:1866 since r14-295-gd89e23f27215fc Date: Fri, 28 Apr 2023 06:40:03 +0000 [thread overview] Message-ID: <bug-109652-4-wx8cAFVrcQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109652-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109652 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- So we're replacing (in a call this time) the aggregate argument ri_3(D)->ARMri5 (it's a union) with a register (gdb) p debug_tree (repl) <parm_decl 0x7ffff7fc9900 ISRA.3 type <integer_type 0x7ffff736fa80 UInt sizes-gimplified SI and we VIEW_CONVERT that to the original aggregate type. That's not really GIMPLE IL we want to have. Instead in this case ISRA.3 should be forced a non-register. The question is whether we can detect this case where I originally tried to fix the original issue - namely 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); I only see (gdb) p *apm $7 = {type = <integer_type 0x7ffff736fa80 UInt>, alias_ptr_type = <pointer_type 0x7ffff739eb28>, unit_offset = 0, base_index = 0, prev_clone_index = 0, op = IPA_PARAM_OP_SPLIT, prev_clone_adjustment = 0, param_prefix_index = 1, reverse = 0, user_flag = 0} so there doesn't seem to be something indicating there's an aggregate use? Of course in theory we can fix up in modify_expression by copying the register to a non-register for such case but that might not be the most efficient way to deal with this. The "easiest" fix is to let this case slip through. It isn't catched by my planned extra IL checking. We'll generate iregEnc (VIEW_CONVERT_EXPR<union { struct { UInt imm5; } I5; }>(_7));
next prev parent reply other threads:[~2023-04-28 6:40 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-27 18:07 [Bug ipa/109652] New: [14 Regression] ICE on valgrind-3.20.0: in modify_expression, at ipa-param-manipulation.cc:1866 slyfox at gcc dot gnu.org 2023-04-27 21:03 ` [Bug ipa/109652] " pinskia at gcc dot gnu.org 2023-04-27 22:19 ` pinskia at gcc dot gnu.org 2023-04-27 22:22 ` sjames at gcc dot gnu.org 2023-04-27 22:56 ` [Bug ipa/109652] [14 Regression] ICE on valgrind-3.20.0: in modify_expression, at ipa-param-manipulation.cc:1866 since r14-295-gd89e23f27215fc sjames at gcc dot gnu.org 2023-04-28 6:40 ` rguenth at gcc dot gnu.org [this message] 2023-04-28 11:36 ` cvs-commit at gcc dot gnu.org 2023-04-28 11:38 ` rguenth at gcc dot gnu.org 2023-04-28 20:47 ` slyfox 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-109652-4-wx8cAFVrcQ@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).