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

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

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

[560] % 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 20210605 (experimental) [master revision
549d7f4310f:e97b11a9189:f31729d794c4150f6cba97f33ec125e180abd7dd] (GCC) 
[561] % 
[561] % gcctk -O1 small.c; ./a.out
[562] % 
[562] % gcctk -Os small.c
[563] % ./a.out
Floating point exception
[564] % 
[564] % cat small.c
int a = 1, b, c, *d = &a, *e = &a, f;
void g(int h) {}
void k(int *l) {
  int ***j;
  if (c) {
    *j = &l;
    ***j;
  }
  g(*l);
  *e = f;
  if (*l) {
    int i = b / a;
    a = i;
  }
}
int main() {
  k(d);
  return 0;
}

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

end of thread, other threads:[~2024-05-06 13:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 10:34 [Bug tree-optimization/100923] New: wrong code at -Os and above on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2021-06-05 11:43 ` [Bug tree-optimization/100923] " zhendong.su at inf dot ethz.ch
2021-06-06 20:57 ` [Bug tree-optimization/100923] wrong code at -O2 " pinskia at gcc dot gnu.org
2021-06-06 20:58 ` [Bug tree-optimization/100923] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2021-06-06 21:02 ` pinskia at gcc dot gnu.org
2021-06-07  9:23 ` rguenth at gcc dot gnu.org
2021-06-07 10:20 ` rguenth at gcc dot gnu.org
2021-06-08 13:09 ` cvs-commit at gcc dot gnu.org
2021-06-08 13:10 ` [Bug tree-optimization/100923] [9/10/11 " rguenth at gcc dot gnu.org
2021-07-07 14:06 ` cvs-commit at gcc dot gnu.org
2021-11-22  8:02 ` [Bug tree-optimization/100923] [9/10 " rguenth at gcc dot gnu.org
2022-02-17 10:48 ` cvs-commit at gcc dot gnu.org
2022-05-27  9:05 ` [Bug tree-optimization/100923] [9 " rguenth at gcc dot gnu.org
2024-05-06 13:12 ` cvs-commit 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).