public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "markus at trippelsdorf dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55253] [4.8 Regression] Revision 193298 miscompiles sqlite with -Os Date: Sun, 11 Nov 2012 09:22:00 -0000 [thread overview] Message-ID: <bug-55253-4-cZq3z42Jm5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-55253-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55253 --- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-11-11 09:22:12 UTC --- Reduced: markus@x4 /tmp % cat test.i struct { int mallocFailed; } *a; struct StrAccum { int useMalloc; } b, c; static void fn1 (struct StrAccum *p1, int p2) { if (p2 == 0) return; if (p1->useMalloc) a->mallocFailed = 0; } void fn2 (struct StrAccum *p1) { fn1 (p1, 1); } void fn3 (struct StrAccum *p1) { fn1 (p1, 1); } void fn4 () { c.useMalloc = 1; fn1 (&c, 0); } int main () { fn3 (&b); return 0; } markus@x4 /tmp % gcc -Os test.i && ./a.out [1] 25665 segmentation fault ./a.out markus@x4 /tmp % gcc -O2 test.i && ./a.out markus@x4 /tmp %
next prev parent reply other threads:[~2012-11-11 9:22 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-09 18:12 [Bug tree-optimization/55253] New: " markus at trippelsdorf dot de 2012-11-11 9:22 ` markus at trippelsdorf dot de [this message] 2012-11-12 12:03 ` [Bug tree-optimization/55253] " jamborm at gcc dot gnu.org 2012-11-13 14:27 ` jamborm at gcc dot gnu.org 2012-11-13 14:31 ` jamborm at gcc dot gnu.org 2012-11-13 17:05 ` jamborm at gcc dot gnu.org 2012-11-13 18:56 ` jamborm at gcc dot gnu.org 2012-11-14 14:02 ` jamborm 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-55253-4-cZq3z42Jm5@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).