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

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

            Bug ID: 105337
           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: ---

[586] % 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.1/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.1 20220421 (experimental) [master r12-8217-g605a80bb733] (GCC) 
[587] % 
[587] % gcctk -O1 small.c; ./a.out
[588] % 
[588] % gcctk -Os small.c
[589] % ./a.out
Aborted
[590] % 
[590] % cat small.c
int printf(const char *, ...);
int a;
int f() {
  int b, c;
  for (b = 0; b < 3; b++) {
    if (!a)
      break;
    c--;
    printf("%d", c);
  }
  return b;
}
int main() {
  if (f())
    __builtin_abort ();
  return 0;
}

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

end of thread, other threads:[~2022-04-22  6:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 16:16 [Bug tree-optimization/105337] New: wrong code at -Os and above on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2022-04-21 16:16 ` [Bug tree-optimization/105337] " zhendong.su at inf dot ethz.ch
2022-04-21 16:32 ` [Bug tree-optimization/105337] [12 Regression] " mpolacek at gcc dot gnu.org
2022-04-21 16:41 ` mpolacek at gcc dot gnu.org
2022-04-21 16:43 ` mpolacek at gcc dot gnu.org
2022-04-21 16:49 ` jakub at gcc dot gnu.org
2022-04-21 16:58 ` jakub at gcc dot gnu.org
2022-04-21 17:00 ` jakub at gcc dot gnu.org
2022-04-22  6:11 ` 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).