public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103202] New: [12 regression] gcc miscompiles ed-1.17
@ 2021-11-11 23:59 slyfox at gcc dot gnu.org
  2021-11-12  0:01 ` [Bug tree-optimization/103202] " pinskia at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: slyfox at gcc dot gnu.org @ 2021-11-11 23:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103202
           Summary: [12 regression] gcc miscompiles ed-1.17
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Created attachment 51774
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51774&action=edit
main_loop.c

Originally found the problem as a test failure on GNU ed-1.17 test suite.

The test fails on gcc-12.0.0 20211107 snapshot and works on gcc-11.2.0 release.

I shrunk test down to a single file, but was not able to figure out where the
problem pops up:

# gcc-11, good:
$ ../result-1/bin/gcc -O2 main_loop.c -o a && ./a
element 1
element 2
element 3

# gcc-12, bad:
$ ../result-2/bin/gcc -O2 main_loop.c -o a && ./a
element 1
element 2

$ LANG=C ../result-1/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/nix/store/gsj6c88q5hf7fmaaym7023q92jvx1i20-gcc-11.2.0/bin/gcc
COLLECT_LTO_WRAPPER=/nix/store/gsj6c88q5hf7fmaaym7023q92jvx1i20-gcc-11.2.0/libexec/gcc/x86_64-unknown-linux-gnu/11.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)

$ LANG=C ../result-2/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/nix/store/1g16njhrdlhq61qh30c063jdmmz3hv4d-gcc-12.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/nix/store/1g16njhrdlhq61qh30c063jdmmz3hv4d-gcc-12.0.0/libexec/gcc/x86_64-unknown-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211107 (experimental) (GCC)

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

end of thread, other threads:[~2021-11-12 19:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 23:59 [Bug tree-optimization/103202] New: [12 regression] gcc miscompiles ed-1.17 slyfox at gcc dot gnu.org
2021-11-12  0:01 ` [Bug tree-optimization/103202] " pinskia at gcc dot gnu.org
2021-11-12  0:05 ` pinskia at gcc dot gnu.org
2021-11-12  1:38 ` pinskia at gcc dot gnu.org
2021-11-12  7:43 ` rguenth at gcc dot gnu.org
2021-11-12  9:15 ` slyfox at gcc dot gnu.org
2021-11-12  9:33 ` rguenth at gcc dot gnu.org
2021-11-12  9:35 ` [Bug tree-optimization/103202] [12 regression] gcc miscompiles ed-1.17 since r12-3876-g4a960d548b7d7d94 marxin at gcc dot gnu.org
2021-11-12 10:18 ` aldyh at gcc dot gnu.org
2021-11-12 10:19 ` aldyh at gcc dot gnu.org
2021-11-12 15:23 ` aldyh at gcc dot gnu.org
2021-11-12 15:24 ` aldyh at gcc dot gnu.org
2021-11-12 16:42 ` slyfox at gcc dot gnu.org
2021-11-12 19:46 ` cvs-commit at gcc dot gnu.org
2021-11-12 19:47 ` aldyh 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).