public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zhendong.su at inf dot ethz.ch" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103006] New: wrong code at -O2 (only) on x86_64-linux-gnu Date: Sat, 30 Oct 2021 17:45:51 +0000 [thread overview] Message-ID: <bug-103006-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103006 Bug ID: 103006 Summary: wrong code at -O2 (only) on x86_64-linux-gnu Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- This is quite long-latent, affecting GCC 7.* and later. [856] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20211030 (experimental) [master r12-4804-g75c9fa318e3] (GCC) [857] % [857] % gcctk -O1 small.c; ./a.out 0 [858] % gcctk -O2 small.c [859] % ./a.out 0 Aborted [860] % [860] % cat small.c int printf(const char *, ...); int a, *b, c, e, f; void g() { int *d[7]; d[6] = b = (int *)d; printf("0\n"); } int i() { for (c = 0; c < 2; c++) { long h[6][2]; for (e = 0; e < 6; e++) for (f = 0; f < 2; f++) h[e][f] = 1; if (c) { g(); return h[3][0]; } } return 0; } int main() { if (i() != 1) __builtin_abort (); return 0; }
next reply other threads:[~2021-10-30 17:45 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-30 17:45 zhendong.su at inf dot ethz.ch [this message] 2021-10-30 22:12 ` [Bug tree-optimization/103006] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2021-10-30 22:15 ` [Bug middle-end/103006] [9/10/11/12 Regression] wrong code at -O1 or -O2 " pinskia at gcc dot gnu.org 2021-10-30 22:28 ` [Bug rtl-optimization/103006] " pinskia at gcc dot gnu.org 2021-11-01 11:13 ` [Bug rtl-optimization/103006] [9/10/11/12 Regression] wrong code at -O1 or -O2 on x86_64-linux-gnu by r7-7101 jakub at gcc dot gnu.org 2021-11-01 11:29 ` jakub at gcc dot gnu.org 2021-11-02 7:17 ` rguenth at gcc dot gnu.org 2021-11-02 7:57 ` jakub at gcc dot gnu.org 2021-11-02 8:10 ` rguenther at suse dot de 2021-11-02 8:20 ` jakub at gcc dot gnu.org 2021-11-02 13:55 ` rguenther at suse dot de 2021-11-05 13:39 ` rguenth at gcc dot gnu.org 2022-01-31 10:52 ` rguenth at gcc dot gnu.org 2022-01-31 13:01 ` rguenth at gcc dot gnu.org 2022-01-31 13:08 ` rguenth at gcc dot gnu.org 2022-02-02 11:44 ` rguenth at gcc dot gnu.org 2022-02-04 13:12 ` rguenth at gcc dot gnu.org 2022-05-27 9:46 ` [Bug rtl-optimization/103006] [10/11/12/13 " rguenth at gcc dot gnu.org 2022-06-28 10:46 ` jakub at gcc dot gnu.org 2023-07-07 10:41 ` [Bug middle-end/103006] [11/12/13/14 " rguenth 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-103006-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).