public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/42874] [4.5 Regression] Error on correct code: sorry, unimplemented: function Âfoo can never be copied because it uses Date: Wed, 27 Jan 2010 08:39:00 -0000 [thread overview] Message-ID: <20100127083940.6612.qmail@sourceware.org> (raw) In-Reply-To: <bug-42874-11173@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from jakub at gcc dot gnu dot org 2010-01-27 08:39 ------- The question is why we can't inline it, when clearly 4.4 branch can inline it just fine. The 4.4 comment says: /* We cannot inline a function of the form void F (int i) { struct S { int ar[i]; } s; } Attempting to do so produces a catch-22. If walk_tree examines the TYPE_FIELDS chain of RECORD_TYPE/ UNION_TYPE nodes, then it goes into infinite recursion on a structure containing a pointer to its own type. If it doesn't, then the type node for S doesn't get adjusted properly when F is inlined. ??? This is likely no longer true, but it's too late in the 4.0 cycle to try to find out. This should be checked for 4.1. */ As 4.4 walk_tree didn't end up with endless recursion on it, I wonder whether we just can't remove this. Note that inlining functions that return variably modified type might still be problematic, but that's order of magnitude rarer (especially because I think most of GCCs so far ICEd on such code). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42874
next prev parent reply other threads:[~2010-01-27 8:39 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-26 15:58 [Bug c/42874] New: Error on correct code krebbel at gcc dot gnu dot org 2010-01-26 22:32 ` [Bug middle-end/42874] [4.5 Regression] Error on correct code: sorry, unimplemented: function foo can never be copied because it uses rguenth at gcc dot gnu dot org 2010-01-27 8:39 ` jakub at gcc dot gnu dot org [this message] 2010-01-27 8:43 ` pinskia at gcc dot gnu dot org 2010-01-27 8:51 ` jakub at gcc dot gnu dot org 2010-01-27 9:08 ` jakub at gcc dot gnu dot org 2010-01-27 10:24 ` rguenth at gcc dot gnu dot org 2010-01-27 15:10 ` jakub at gcc dot gnu dot org 2010-01-27 15:21 ` jakub at gcc dot gnu dot org 2010-02-07 4:46 ` hjl at gcc dot gnu dot 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=20100127083940.6612.qmail@sourceware.org \ --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).