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/100453] New: wrong code at -O1 and above
Date: Thu, 06 May 2021 14:11:57 +0000	[thread overview]
Message-ID: <bug-100453-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100453

            Bug ID: 100453
           Summary: wrong code at -O1 and above
           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: ---

It seems to be a recent regression.

[513] % 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 20210506 (experimental) [master revision
1698f496c5e:27b373b33d4:a1ac9ffb5a7f44b2e2633b7265c21ce803c8e854] (GCC) 
[514] % 
[514] % gcctk -O0 small.c; ./a.out
[515] % gcc110 -O1 small.c; ./a.out
[516] % 
[516] % gcctk -O1 small.c
[517] % ./a.out
Segmentation fault
[518] % 
[518] % cat small.c
struct a {
  int b : 4;
} d;
static int c, e;
static const struct a f;
static void g(const struct a h) {
  for (; c < 1; c++)
    d = h;
  e = h.b;
  c = h.b;
}
int main() {
  g(f);
  return 0;
}

             reply	other threads:[~2021-05-06 14:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 14:11 zhendong.su at inf dot ethz.ch [this message]
2021-05-06 17:34 ` [Bug tree-optimization/100453] [12 Regression] wrong code at -O1 and above since r12-434 jakub at gcc dot gnu.org
2021-05-11 12:24 ` ebotcazou at gcc dot gnu.org
2021-05-12 16:43 ` jamborm at gcc dot gnu.org
2021-05-13 12:25 ` jamborm at gcc dot gnu.org
2021-05-13 13:04 ` ebotcazou at gcc dot gnu.org
2021-05-13 21:27 ` cvs-commit at gcc dot gnu.org
2021-05-13 21:29 ` jamborm at gcc dot gnu.org
2021-05-14 16:24 ` ebotcazou at gcc dot gnu.org
2021-05-15  8:28 ` cvs-commit at gcc dot gnu.org
2021-05-15  8:33 ` jamborm at gcc dot gnu.org
2021-05-16 21:06 ` ebotcazou at gcc dot gnu.org
2021-06-09 21:32 ` pinskia at gcc dot gnu.org
2021-06-15 15:10 ` jamborm at gcc dot gnu.org
2021-06-16  7:25 ` pinskia at gcc dot gnu.org
2021-06-16 11:24 ` cvs-commit at gcc dot gnu.org
2021-06-16 11:31 ` 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-100453-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: link
Be 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).