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

            Bug ID: 103432
           Summary: [12 regression] libjxl-0.5 is miscompiled, works fine
                    with -fno-ipa-modref
           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 51875
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51875&action=edit
dct_test.cc

Originally noticed a problem as failed tests on libjxl-0.5.

I extracted ~10KB self-contained single-file example. It still could be
reduced, but it's quite tangled. Could you see what is obviously wrong with it?

Attached the reproducer as dct_test.cc:

$ g++-12.0.0 -std=c++11 -O2 -fno-tree-vectorize                 dct_test.cc -o
dct_test
$ g++-12.0.0 -std=c++11 -O2 -fno-tree-vectorize -fno-ipa-modref dct_test.cc -o
dct_test1

# good:
$ ./dct_test1
OK: Good accuracy: exp=0.000001 act=0.000000
OK: Good accuracy: exp=0.000001 act=0.000000

# bad:
$ ./dct_test
OK: Good accuracy: exp=0.000001 act=0.000000
ERROR: Too low accuracy: exp=0.000001 act=1.000000

$ g++-12.0.0 -v
Using built-in specs.
COLLECT_GCC=/nix/store/2lxwqh3k88x4jwyfwlsfnwrp78yq2ah2-gcc-12.0.0/bin/g++
COLLECT_LTO_WRAPPER=/nix/store/2lxwqh3k88x4jwyfwlsfnwrp78yq2ah2-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 20211121 (experimental) (GCC)

Reply via email to