public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "su at cs dot ucdavis.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58640] New: wrong code (segfaults) at -O3 on x86_64-linux-gnu Date: Sun, 06 Oct 2013 05:23:00 -0000 [thread overview] Message-ID: <bug-58640-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58640 Bug ID: 58640 Summary: wrong code (segfaults) at -O3 on x86_64-linux-gnu Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu The current gcc trunk mis-compiles the following code on x86_64-linux at -O3 in both 32-bit and 64-bit modes, resulting in a segfault. This is a regression from 4.8.x. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --enable-languages=c,c++,objc,obj-c++,fortran,lto --disable-werror --enable-checking=release --with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk --with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk --prefix=/usr/local/gcc-trunk Thread model: posix gcc version 4.9.0 20131005 (experimental) [trunk revision 203223] (GCC) $ $ gcc-trunk -O2 small.c; a.out $ gcc-4.8 -O3 small.c; a.out $ gcc-trunk -O3 small.c; a.out Segmentation fault (core dumped) $ ------------------------------------- int a, b, c, d = 1, e; static signed char foo () { int f, g = a; for (f = 1; f < 3; f++) for (; b < 1; b++) { if (d) for (c = 0; c < 4; c++) for (f = 0; f < 3; f++) { for (e = 0; e < 1; e++) a = g; if (f) break; } else if (f) continue; return 0; } return 0; } int main () { foo (); return 0; }
next reply other threads:[~2013-10-06 5:23 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-06 5:23 su at cs dot ucdavis.edu [this message] 2013-10-06 12:31 ` [Bug tree-optimization/58640] " mikpelinux at gmail dot com 2013-10-10 11:59 ` [Bug tree-optimization/58640] [4.9 Regression] " rguenth at gcc dot gnu.org 2013-10-10 19:23 ` law at redhat dot com 2013-10-10 20:09 ` law at redhat dot com 2013-10-10 20:47 ` law at redhat dot com 2013-10-11 3:07 ` law at redhat dot com 2013-10-11 20:31 ` law at gcc dot gnu.org 2013-10-11 20:32 ` law at redhat dot com 2013-10-12 0:56 ` su at cs dot ucdavis.edu 2013-10-14 9:15 ` rguenth at gcc dot gnu.org 2013-10-14 9:17 ` rguenth at gcc dot gnu.org 2013-11-09 6:02 ` law at redhat dot com 2013-12-08 17:05 ` olegendo at gcc dot gnu.org 2013-12-10 6:55 ` law at redhat dot com 2013-12-10 11:20 ` olegendo 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-58640-4@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).