public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/99122] [10/11 Regression] ICE in force_constant_size, at gimplify.c:733 Date: Wed, 17 Feb 2021 17:52:37 +0000 [thread overview] Message-ID: <bug-99122-4-XtAkcXVPeg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99122-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99122 --- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #5) > That could perhaps work for the #c0 testcase where the function actually has > a non-VL parameter and so garbage in garbage out. > But would that work also for #c2? No, at least not on its own. It leaks struct S, which is local to bar, to the IL of foo, which hits an assert in make_decl_rtl. Einline dump has: struct T b; ... x.1_28 = __builtin_alloca_with_align (_26, 8); _20 = (long unsigned int) n_14(D); _21 = &x.1_28->a; __builtin_memset (_21, 0, _20); b = MEM <struct T> [(struct S *)x.1_28]; > If one dumps the #c2 testcase with -O2 -fno-inline -fdump-tree-optimized, > the PARM_DECL is clearly variable length but not lowered to *ptr, while > in the caller it is lowered that way and allocated through > __builtin_alloca_with_align. > So, clearly PARM_DECLs can be variable length but VAR_DECLs should not be > (they should be gimplified into ptr = __builtin_alloca_with_align with stack > save/restore around the scope and DECL_VALUE_EXPR of *ptr. > The inliner certainly doesn't do that right now. > > For punting on inlining these, I couldn't find any spot that would try to > verify at least remote compatibility of the passed in arguments and the > arguments the callee expects. No, with LTO it would be too late even if we tried to, (IPA) inlining decisions are not meant to be un-doable. The idea was that mismatches are undefined and so we should try our best to emulate non-inlining and not ICE. But apparently we don't manage that now.
next prev parent reply other threads:[~2021-02-17 17:52 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-16 17:38 [Bug c/99122] New: " gscfq@t-online.de 2021-02-16 18:24 ` [Bug ipa/99122] " jakub at gcc dot gnu.org 2021-02-17 16:38 ` jakub at gcc dot gnu.org 2021-02-17 17:03 ` jamborm at gcc dot gnu.org 2021-02-17 17:10 ` jamborm at gcc dot gnu.org 2021-02-17 17:15 ` jakub at gcc dot gnu.org 2021-02-17 17:52 ` jamborm at gcc dot gnu.org [this message] 2021-02-17 17:57 ` jakub at gcc dot gnu.org 2021-02-18 9:09 ` rguenth at gcc dot gnu.org 2021-02-18 11:20 ` rguenth at gcc dot gnu.org 2021-02-18 11:26 ` rguenth at gcc dot gnu.org 2021-02-18 11:27 ` jakub at gcc dot gnu.org 2021-02-18 12:00 ` jakub at gcc dot gnu.org 2021-02-18 12:24 ` jamborm at gcc dot gnu.org 2021-02-18 12:42 ` jamborm at gcc dot gnu.org 2021-02-18 13:38 ` cvs-commit at gcc dot gnu.org 2021-02-18 18:13 ` jamborm at gcc dot gnu.org 2021-02-19 8:37 ` rguenth at gcc dot gnu.org 2021-02-19 8:42 ` rguenth at gcc dot gnu.org 2021-02-19 10:31 ` jamborm at gcc dot gnu.org 2021-02-19 10:40 ` jakub at gcc dot gnu.org 2021-02-19 10:54 ` rguenther at suse dot de 2021-02-19 13:20 ` cvs-commit at gcc dot gnu.org 2021-02-25 13:01 ` rguenth at gcc dot gnu.org 2021-03-04 14:22 ` jamborm at gcc dot gnu.org 2021-03-05 14:28 ` jamborm at gcc dot gnu.org 2021-03-06 10:54 ` dcb314 at hotmail dot com 2021-03-24 19:28 ` cvs-commit at gcc dot gnu.org 2021-03-29 16:31 ` jakub at gcc dot gnu.org 2021-03-29 16:43 ` jamborm at gcc dot gnu.org 2021-04-08 12:02 ` [Bug ipa/99122] [10 " rguenth at gcc dot gnu.org 2021-06-02 11:27 ` ebotcazou at gcc dot gnu.org 2021-06-02 11:44 ` rguenth at gcc dot gnu.org 2021-06-02 12:25 ` ebotcazou at gcc dot gnu.org 2021-06-02 12:42 ` rguenth at gcc dot gnu.org 2021-06-02 13:03 ` ebotcazou at gcc dot gnu.org 2021-06-03 10:46 ` cvs-commit at gcc dot gnu.org 2021-06-03 10:49 ` cvs-commit at gcc dot gnu.org 2022-06-28 10:43 ` jakub at gcc dot gnu.org 2023-07-07 9:27 ` 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-99122-4-XtAkcXVPeg@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).