public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115579] New: wrong code at -Os with "-fno-tree-sra" on x86_64-linux-gnu
@ 2024-06-21 12:42 zhendong.su at inf dot ethz.ch
  2024-06-21 12:43 ` [Bug tree-optimization/115579] " sjames at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2024-06-21 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115579
           Summary: wrong code at -Os with "-fno-tree-sra" 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 very recent regression as it doesn't reproduce with 14.1. 

Compiler Explorer: https://godbolt.org/z/8qsq5zbeE


[572] % 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/15.0.0/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 --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240620 (experimental) (GCC) 
[573] % 
[573] % gcctk -Os small.c; ./a.out
[574] % 
[574] % gcctk -Os -fno-tree-sra small.c
[575] % ./a.out
Aborted
[576] % 
[576] % cat small.c
int printf(const char *, ...);
int a, b = 1, c;
int main() {
  int d[2], *e = &d[1];
  while (a) {
    int *f = &b;
    d[1] = 0;
    *f = 0;
  }
  if (c)
    printf("%d\n", *e);
  if (b != 1)
    __builtin_abort();
  return 0;
}

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

end of thread, other threads:[~2024-06-23  9:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-21 12:42 [Bug tree-optimization/115579] New: wrong code at -Os with "-fno-tree-sra" on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2024-06-21 12:43 ` [Bug tree-optimization/115579] " sjames at gcc dot gnu.org
2024-06-21 12:44 ` [Bug tree-optimization/115579] [15 regression] " sjames at gcc dot gnu.org
2024-06-21 13:49 ` [Bug tree-optimization/115579] [15 regression] wrong code at -Os with "-fno-tree-sra" on x86_64-linux-gnu since r15-1391-g4b75ed33fa5fd6 sjames at gcc dot gnu.org
2024-06-21 16:36 ` zhendong.su at inf dot ethz.ch
2024-06-21 16:43 ` pinskia at gcc dot gnu.org
2024-06-21 16:45 ` pinskia at gcc dot gnu.org
2024-06-21 16:58 ` pinskia at gcc dot gnu.org
2024-06-22 12:28 ` rguenth at gcc dot gnu.org
2024-06-22 12:58 ` rguenth at gcc dot gnu.org
2024-06-23  9:24 ` cvs-commit at gcc dot gnu.org
2024-06-23  9:24 ` 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).