public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101223] New: wrong code at -Os and above on x86_64-linux-gnu
@ 2021-06-26 12:44 zhendong.su at inf dot ethz.ch
  2021-06-28  2:34 ` [Bug tree-optimization/101223] [11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-06-26 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

It also affects GCC 11.*, but not GCC 10.*. 

[516] % 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 20210626 (experimental) [master revision
2168bfb8144:f9d3bc42803:5b1ce655b25040048861af6c0264cb667b66fcd7] (GCC) 
[517] % 
[517] % gcctk -O1 small.c; ./a.out
[518] % 
[518] % gcctk -Os small.c
[519] % ./a.out
Aborted
[520] % 
[520] % cat small.c
struct {
  int a : 1;
} b;
int c = 1, d;
int main() {
  for (; d < 2; d++) {
    int e = ~c, f = 0, g;
    if (e) {
      f = c;
      g = b.a;
      b.a = f;
      if (b.a >= g)
        __builtin_abort();
    }
    c = f;
    b.a = g;
  }
  return 0;
}

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-07-14 22:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-26 12:44 [Bug tree-optimization/101223] New: wrong code at -Os and above on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2021-06-28  2:34 ` [Bug tree-optimization/101223] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-06-28  3:00 ` [Bug tree-optimization/101223] [11/12 Regression] evrp produces wrong code pinskia at gcc dot gnu.org
2021-06-28  3:03 ` pinskia at gcc dot gnu.org
2021-06-28  7:02 ` rguenth at gcc dot gnu.org
2021-06-28  7:27 ` [Bug tree-optimization/101223] [11/12 Regression] evrp produces wrong code since r11-3685-gfcae5121154d1c33 marxin at gcc dot gnu.org
2021-06-28 10:57 ` aldyh at gcc dot gnu.org
2021-06-28 10:58 ` jakub at gcc dot gnu.org
2021-06-28 10:59 ` aldyh at gcc dot gnu.org
2021-06-28 14:19 ` amacleod at redhat dot com
2021-07-02 13:03 ` rsandifo at gcc dot gnu.org
2021-07-02 13:14 ` jakub at gcc dot gnu.org
2021-07-02 13:18 ` rsandifo at gcc dot gnu.org
2021-07-02 15:35 ` cvs-commit at gcc dot gnu.org
2021-07-02 15:37 ` amacleod at redhat dot com
2021-07-02 20:31 ` [Bug tree-optimization/101223] [11 " pinskia at gcc dot gnu.org
2021-07-14 21:58 ` cvs-commit at gcc dot gnu.org
2021-07-14 22:16 ` amacleod at redhat dot com

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).