public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/51990] ICE in copy_reference_ops_from_ref Date: Wed, 25 Jan 2012 10:27:00 -0000 [thread overview] Message-ID: <bug-51990-4-D6NF9jB3PH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51990-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51990 --- Comment #3 from vries at gcc dot gnu.org 2012-01-25 10:15:53 UTC --- (In reply to comment #2) > This extension is not even documented, see PR 37428 for more info. > There are at least these 3 examples in the testsuite that use this extension: gcc.c-torture/compile/20030224-1.c gcc.c-torture/execute/20020412-1.c gcc.dg/lto/20090706-1_0.c These 3 tests fail (in unmodified form) with my patch for PR51879 (see PR51879 comment 7) on this ICE. > I want to say this example is invalid as the function foo does not have enough > info about the size of struct s. If the example is indeed valid, it would be nice if the compiler at least warned about that. Either way, the last 2 tests listed above use (int, ...) as prototype. IIUC, using that prototype would remove your concern about invalidity. Using that prototype instead, I get the same ICE: ... int zzz (char *s1, char *s2, int len, int *q) { int z = 5; unsigned int i, b; struct s { char a[z]; }; struct s x; extern int foo (int, ...) __attribute__((pure)); for (i = 0; i < len; i++) s1[i] = s2[i]; b = z & 0x3; len += (b == 0 ? 0 : 1) + z; *q = len; return foo (z, x, x); } ... I suppose another way to achieve the same is to use a nested function: ... __attribute__((pure,noinline)) int foo (struct s s1, struct s s2) { return 0; } ...
next prev parent reply other threads:[~2012-01-25 10:16 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-25 8:45 [Bug tree-optimization/51990] New: " vries at gcc dot gnu.org 2012-01-25 8:55 ` [Bug tree-optimization/51990] " vries at gcc dot gnu.org 2012-01-25 9:43 ` pinskia at gcc dot gnu.org 2012-01-25 10:27 ` vries at gcc dot gnu.org [this message] 2012-01-25 10:46 ` rguenth at gcc dot gnu.org 2012-01-25 12:10 ` vries at gcc dot gnu.org 2012-01-25 12:29 ` vries at gcc dot gnu.org 2012-01-27 10:49 ` vries at gcc dot gnu.org 2012-01-27 10:51 ` vries at gcc dot gnu.org 2012-01-28 16:49 ` vries 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-51990-4-D6NF9jB3PH@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).