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 debug/41340] [4.5 Regression] G++ produces different code with and without -g option Date: Mon, 19 Oct 2009 17:05:00 -0000 [thread overview] Message-ID: <20091019170502.7135.qmail@sourceware.org> (raw) In-Reply-To: <bug-41340-16926@http.gcc.gnu.org/bugzilla/> ------- Comment #7 from jakub at gcc dot gnu dot org 2009-10-19 17:05 ------- Confirmed, for -m32 -march=i686 -O3 -g vs. -g0 generates different code on: typedef struct { int t; } *T; struct S1 { unsigned s1; }; struct S2 { struct S1 s2; }; struct S3 { unsigned s3; struct S2 **s4; }; struct S5 { struct S2 *s5; }; extern void fn0 (void) __attribute__ ((__noreturn__)); T fn6 (struct S3); void fn7 (void); int fn1 (const struct S1 *x) { return x->s1; } int fn2 (const struct S1 *x, unsigned y) { if (y >= x->s1) fn0 (); return 0; } int fn3 (struct S3 x) { return (x.s3 == fn1 (*x.s4 ? &(*x.s4)->s2 : 0)); } int fn4 (struct S3 x) { return fn2 (&(*x.s4)->s2, x.s3); } int fn5 (struct S3 x, T *y) { if (!fn3 (x)) { *y = (T) (long) fn4 (x); return 1; } return 0; } void test (struct S5 *x) { struct S3 a; T b; unsigned char c = 0; a.s4 = &x->s5; while (fn5 (a, &b)) if (!(b->t & 8)) c = 1; a.s4 = &x->s5; while ((b = fn6 (a))) ; if (!c) fn7 (); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41340
next prev parent reply other threads:[~2009-10-19 17:05 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-09-11 21:33 [Bug other/41340] New: " d dot g dot gorbachev at gmail dot com 2009-09-11 21:33 ` [Bug other/41340] " d dot g dot gorbachev at gmail dot com 2009-09-12 11:54 ` rguenth at gcc dot gnu dot org 2009-09-18 9:22 ` [Bug debug/41340] " rguenth at gcc dot gnu dot org 2009-09-19 9:20 ` davek at gcc dot gnu dot org 2009-09-19 9:21 ` davek at gcc dot gnu dot org 2009-10-15 18:17 ` aoliva at gcc dot gnu dot org 2009-10-16 20:10 ` d dot g dot gorbachev at gmail dot com 2009-10-16 20:12 ` d dot g dot gorbachev at gmail dot com 2009-10-19 17:05 ` jakub at gcc dot gnu dot org [this message] 2009-10-19 17:14 ` jakub at gcc dot gnu dot org 2009-10-19 18:35 ` jakub at gcc dot gnu dot org 2009-10-20 9:40 ` jakub at gcc dot gnu dot org 2009-10-20 13:29 ` jakub at gcc dot gnu dot org 2009-10-20 14:32 ` jakub at gcc dot gnu dot org 2009-10-23 9:16 ` [Bug debug/41340] [4.5 Regression] GCC " d dot g dot gorbachev at gmail dot com
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=20091019170502.7135.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).