public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108574] New: wrong code at -Os and above on x86_64-linux-gnu
@ 2023-01-27 17:04 zhendong.su at inf dot ethz.ch
  2023-01-27 17:07 ` [Bug tree-optimization/108574] " zhendong.su at inf dot ethz.ch
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-01-27 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108574
           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 appears to be a recent regression from 12.2.

Compiler Explorer: https://godbolt.org/z/4T3xMvsab


[578] % 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/13.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.1 20230127 (experimental) [master r12-4647-g3f861a5c8fd] (GCC) 
[579] % 
[579] % gcctk -O3 small.c
[580] % ./a.out
Floating point exception
[581] % 
[581] % cat small.c
int a = 1, b, c = 2, d;
int main() {
  if (b)
    goto L2;
 L1:
  {
    int e = c;
    a = 1 % a;
    while (e && 1 <= d)
      ;
    d >= b;
  L2:
    if (1 >= e)
      goto L1;
  }
  return 0;
}

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

end of thread, other threads:[~2023-01-30  9:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 17:04 [Bug tree-optimization/108574] New: wrong code at -Os and above on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2023-01-27 17:07 ` [Bug tree-optimization/108574] " zhendong.su at inf dot ethz.ch
2023-01-27 21:12 ` zhendong.su at inf dot ethz.ch
2023-01-27 22:56 ` [Bug tree-optimization/108574] [13 Regression] " pinskia at gcc dot gnu.org
2023-01-30  8:14 ` rguenth at gcc dot gnu.org
2023-01-30  8:32 ` rguenth at gcc dot gnu.org
2023-01-30  9:51 ` cvs-commit at gcc dot gnu.org
2023-01-30  9:51 ` rguenth at gcc dot gnu.org

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