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

            Bug ID: 124111
           Summary: [16 regression] lapack-3.12.1 miscompiled
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 63678
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63678&action=edit
build.sh

lapack-3.12.1 seems miscompiled with -O2 -march=x86-64-v3 -fno-vect-cost-model
(I can reproduce it with some specific -march w/o -fno-vect-cost-model).

It's been failing for me since beginning of January or so looking at logs.

Attached script I've used w/ lapack-3.12.1 tarball to build and run the
testsuite.

```
96% tests passed, 4 tests failed out of 107

Total Test time (real) = 115.96 sec

The following tests FAILED:
          9 - BLAS-xblat3c (Failed)
         12 - BLAS-xblat3z (Failed)
         60 - LAPACK-xlintstc_ctest_in (Failed)
         83 - LAPACK-xlintstz_ztest_in (Failed)
```

```
~/bugs/lapack/lapack-3.12.1 $
/home/sam/bugs/lapack/lapack-3.12.1/build/bin/xblat3c <
/home/sam/bugs/lapack/lapack-3.12.1/BLAS/TESTING/cblat3.in
At line 3960 of file /home/sam/bugs/lapack/lapack-3.12.1/BLAS/TESTING/cblat3.f
(unit = 6, file = 'cblat3.out')
Fortran runtime error: Expected INTEGER or UNSIGNED for item 7 in formatted
transfer, got REAL
( 1X, I6, ': ', A6, '(''',A1, ''',''',A1, ''',''', A1,''',',      2( I3, ',' ),
                                                                     ^

Error termination. Backtrace:
#0  0x7f436526b911 in check_dtio_proc
        at
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/libgfortran/io/transfer.c:1540
#1  0x7f436526b911 in check_dtio_proc
        at
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/libgfortran/io/transfer.c:1528
#2  0x7f436526b911 in formatted_transfer_scalar_write
        at
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/libgfortran/io/transfer.c:2292
#3  0x7f436526c672 in formatted_transfer
        at
/usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/libgfortran/io/transfer.c:2625
#4  0x55e3b8f87ed6 in ???
#5  0x55e3b8f9b68c in ???
#6  0x55e3b8f7f2a0 in ???
#7  0x7f43646286cd in __libc_start_call_main
        at ../sysdeps/nptl/libc_start_call_main.h:59
#8  0x7f43646287e9 in __libc_start_main_impl
        at ../csu/libc-start.c:360
#9  0x55e3b8f7f2d4 in ???
#10  0xffffffffffffffff in ???
```

```
sam@sam-build ~ $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/16/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/16
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python
--enable-libphobos --enable-objc-gc
--enable-languages=c,c++,d,objc,obj-c++,fortran,ada,rust --enable-obsolete
--enable-secureplt --disable-werror --with-system-zlib --enable-nls
--without-included-gettext --disable-libunwind-exceptions
--enable-checking=yes,extra,rtl,df --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 16.0.9999 p, commit
ca7fc8c91b0b89212c552ad0f21f2a1f267be3b9' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-tls=gnu2 --enable-multilib --with-multilib-list=m32,mx32,m64
--disable-fixed-point --with-abi=m64 --enable-targets=all
--enable-offload-defaulted --enable-offload-targets=nvptx-none --enable-libgomp
--disable-libssp --enable-libada --enable-cet --disable-systemtap
--enable-valgrind-annotations --enable-valgrind-interop --disable-vtable-verify
--disable-libvtv --with-zstd --without-isl --enable-default-pie
--enable-host-pie --enable-host-bind-now --enable-default-ssp
--disable-fixincludes --with-gxx-libcxx-include-dir=/usr/include/c++/v1
--enable-linker-build-id --enable-linker-build-id --enable-linker-build-id
--enable-linker-build-id --with-build-config='bootstrap-O3 bootstrap-lto
bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260214 (experimental)
904b7a3010aaf2abe22643b92a1374ace40ec574 (Gentoo 16.0.9999 p, commit
ca7fc8c91b0b89212c552ad0f21f2a1f267be3b9)
```

Reply via email to