public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
@ 2022-07-27 19:40 danglin at gcc dot gnu.org
2022-07-27 19:41 ` [Bug target/106458] " danglin at gcc dot gnu.org
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
Bug ID: 106458
Summary: [12 Regression] glibc's malloc/tst-scratch_buffer.c
test is miscompiled with gcc-12
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Created attachment 53363
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53363&action=edit
.c file
dave@atlas:~/gnu/glibc/objdir$ make test t=malloc/tst-scratch_buffer
make -r PARALLELMFLAGS="" -C ../glibc objdir=`pwd` test
make[1]: Entering directory '/home/dave/gnu/glibc/glibc'
make subdir=malloc -C malloc/ ..=../
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.out
make[2]: Entering directory '/home/dave/gnu/glibc/glibc/malloc'
gcc tst-scratch_buffer.c -c -std=gnu11 -fgnu89-inline -g -O2 -Wall
-Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math
-fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition
-fmath-errno -fno-pie -I../include
-I/home/dave/gnu/glibc/objdir/malloc -I/home/dave/gnu/glibc/objdir
-I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/hppa/nptl
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux
-I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/hppa/fpu
-I../sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio
-I. -nostdinc -isystem /usr/lib/gcc/hppa-linux-gnu/12/include -isystem
/usr/include -D_LIBC_REENTRANT -include
/home/dave/gnu/glibc/objdir/libc-modules.h -DMODULE_NAME=testsuite_internal
-include ../include/libc-symbols.h -DTOP_NAMESPACE=glibc -o
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.o -MD -MP -MF
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.o.dt -MT
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.o
gcc -o /home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer -nostdlib
-nostartfiles -Wl,-z,relro /home/dave/gnu/glibc/objdir/csu/crt1.o
/home/dave/gnu/glibc/objdir/csu/crti.o `gcc --print-file-name=crtbegin.o`
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.o
/home/dave/gnu/glibc/objdir/support/libsupport_nonshared.a
-Wl,-dynamic-linker=/lib/ld.so.1
-Wl,-rpath-link=/home/dave/gnu/glibc/objdir:/home/dave/gnu/glibc/objdir/math:/home/dave/gnu/glibc/objdir/elf:/home/dave/gnu/glibc/objdir/dlfcn:/home/dave/gnu/glibc/objdir/nss:/home/dave/gnu/glibc/objdir/nis:/home/dave/gnu/glibc/objdir/rt:/home/dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objdir/mathvec:/home/dave/gnu/glibc/objdir/support:/home/dave/gnu/glibc/objdir/crypt:/home/dave/gnu/glibc/objdir/nptl
-lgcc -Wl,--as-needed -lgcc_s -Wl,--no-as-needed
/home/dave/gnu/glibc/objdir/libc.so.6
/home/dave/gnu/glibc/objdir/libc_nonshared.a -Wl,--as-needed
/home/dave/gnu/glibc/objdir/elf/ld.so -Wl,--no-as-needed -lgcc -Wl,--as-needed
-lgcc_s -Wl,--no-as-needed `gcc --print-file-name=crtend.o`
/home/dave/gnu/glibc/objdir/csu/crtn.o
env GCONV_PATH=/home/dave/gnu/glibc/objdir/iconvdata
LOCPATH=/home/dave/gnu/glibc/objdir/localedata LC_ALL=C
/home/dave/gnu/glibc/objdir/elf/ld.so.1 --library-path
/home/dave/gnu/glibc/objdir:/home/dave/gnu/glibc/objdir/math:/home/dave/gnu/glibc/objdir/elf:/home/dave/gnu/glibc/objdir/dlfcn:/home/dave/gnu/glibc/objdir/nss:/home/dave/gnu/glibc/objdir/nis:/home/dave/gnu/glibc/objdir/rt:/home/dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objdir/mathvec:/home/dave/gnu/glibc/objdir/support:/home/dave/gnu/glibc/objdir/crypt:/home/dave/gnu/glibc/objdir/nptl
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer >
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.out; \
../scripts/evaluate-test.sh malloc/tst-scratch_buffer $? false false >
/home/dave/gnu/glibc/objdir/malloc/tst-scratch_buffer.test-result
make[2]: Leaving directory '/home/dave/gnu/glibc/glibc/malloc'
FAIL: malloc/tst-scratch_buffer
original exit status 1
tst-scratch_buffer.c:167: error: blob comparison failed
blob length: 1040 bytes
left (evaluated from r):
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\000\000\000\020\000\000\004\000\000\000\004\020\367\211\025\230"
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 00 00 00 10 00 00 04 00 00 00 04 10 F7 89
15 98
right (evaluated from buf.data):
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\000\000\000\020\000\000\004\000\000\000\004\020\367\211\025\250"
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40
40 40 40 40 40 40 40 40 40 40 40 40 00 00 00 10 00 00 04 00 00 00 04 10 F7 89
15 A8
error: 1 test failures
make[1]: Leaving directory '/home/dave/gnu/glibc/glibc'
dave@atlas:~/gnu/glibc/objdir$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/hppa-linux-gnu/12/lto-wrapper
Target: hppa-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 12.1.0-7'
--with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs
--enable-languages=c,ada,c++,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-12
--program-prefix=hppa-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-libssp --disable-libitm
--disable-libsanitizer --disable-libquadmath --disable-libquadmath-support
--enable-plugin --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --disable-libstdcxx-pch --enable-checking=release
--build=hppa-linux-gnu --host=hppa-linux-gnu --target=hppa-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.1.0 (Debian 12.1.0-7)
The test passes when compiled with gcc-11.
dave@atlas:~/gnu/glibc/objdir$ gcc-11 -v
Using built-in specs.
COLLECT_GCC=gcc-11
COLLECT_LTO_WRAPPER=/usr/lib/gcc/hppa-linux-gnu/11/lto-wrapper
Target: hppa-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 11.3.0-5'
--with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs
--enable-languages=c,ada,c++,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-11
--program-prefix=hppa-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-libssp --disable-libitm
--disable-libsanitizer --disable-libquadmath --disable-libquadmath-support
--enable-plugin --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --disable-libstdcxx-pch --enable-checking=release
--build=hppa-linux-gnu --host=hppa-linux-gnu --target=hppa-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Debian 11.3.0-5)
The .s file generated from tst-scratch_buffer.c with gcc-11 works. The .s file
generated with gcc-12 fails as above.
Looks like last character in gcc-12 blob is wrong.
Test passes when compiled with -O1 with gcc-12.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
@ 2022-07-27 19:41 ` danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53364
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53364&action=edit
.i file
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
2022-07-27 19:41 ` [Bug target/106458] " danglin at gcc dot gnu.org
@ 2022-07-27 19:42 ` danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53365
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53365&action=edit
.s file generated with gcc-11
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
2022-07-27 19:41 ` [Bug target/106458] " danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
@ 2022-07-27 19:42 ` danglin at gcc dot gnu.org
2022-07-28 8:12 ` [Bug target/106458] [12/13 " rguenth at gcc dot gnu.org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-07-27 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53366
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53366&action=edit
.s file generated with gcc-12
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (2 preceding siblings ...)
2022-07-27 19:42 ` danglin at gcc dot gnu.org
@ 2022-07-28 8:12 ` rguenth at gcc dot gnu.org
2022-07-29 12:50 ` dave.anglin at bell dot net
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-28 8:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12 Regression] glibc's |[12/13 Regression] glibc's
|malloc/tst-scratch_buffer.c |malloc/tst-scratch_buffer.c
|test is miscompiled with |test is miscompiled with
|gcc-12 |gcc-12
Target Milestone|--- |12.2
Known to work| |11.3.0
Known to fail| |12.1.0
Keywords| |wrong-code
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you check trunk / the gcc 12 branch head?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (3 preceding siblings ...)
2022-07-28 8:12 ` [Bug target/106458] [12/13 " rguenth at gcc dot gnu.org
@ 2022-07-29 12:50 ` dave.anglin at bell dot net
2022-07-29 14:46 ` dave.anglin at bell dot net
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-07-29 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #5 from dave.anglin at bell dot net ---
On 2022-07-28 4:12 a.m., rguenth at gcc dot gnu.org wrote:
> Can you check trunk / the gcc 12 branch head?
Test fails in the same way with trunk.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (4 preceding siblings ...)
2022-07-29 12:50 ` dave.anglin at bell dot net
@ 2022-07-29 14:46 ` dave.anglin at bell dot net
2022-07-30 7:09 ` sam at gentoo dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-07-29 14:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #6 from dave.anglin at bell dot net ---
On 2022-07-29 8:50 a.m., dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
>
> --- Comment #5 from dave.anglin at bell dot net ---
> On 2022-07-28 4:12 a.m., rguenth at gcc dot gnu.org wrote:
>> Can you check trunk / the gcc 12 branch head?
> Test fails in the same way with trunk.
Aside from a couple of .stringz and .ident assembler statements, there is no
difference in the assembly code generated
by "GCC: (GNU) 13.0.0 20220728 (experimental) [master r13-1220-g7c1c7e120cc]"
and "GCC: (Debian 12.1.0-7) 12.1.0".
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (5 preceding siblings ...)
2022-07-29 14:46 ` dave.anglin at bell dot net
@ 2022-07-30 7:09 ` sam at gentoo dot org
2022-08-04 14:14 ` [Bug tree-optimization/106458] " danglin at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: sam at gentoo dot org @ 2022-07-30 7:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #7 from Sam James <sam at gentoo dot org> ---
Thanks Dave. I'd seen this failure when testing glibc 2.36 but hadn't looked
into it more (too warm to keep machine on).
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (6 preceding siblings ...)
2022-07-30 7:09 ` sam at gentoo dot org
@ 2022-08-04 14:14 ` danglin at gcc dot gnu.org
2022-08-07 22:22 ` danglin at gcc dot gnu.org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-08-04 14:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |tree-optimization
--- Comment #8 from John David Anglin <danglin at gcc dot gnu.org> ---
This bug was introduced in the following commit:
dave@atlas:~/gnu/gcc/gcc$ git bisect bad
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[2b8453c401b699ed93c085d0413ab4b5030bcdb8] Enable auto-vectorization at O2 with
very-cheap cost model.
dave@atlas:~/gnu/gcc/gcc$ git log
commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8 (HEAD)
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Sep 6 13:48:49 2021 +0800
Enable auto-vectorization at O2 with very-cheap cost model.
gcc/ChangeLog:
* common.opt (ftree-vectorize): Add Var(flag_tree_vectorize).
* doc/invoke.texi (Options That Control Optimization): Update
documents.
* opts.c (default_options_table): Enable auto-vectorization at
O2 with very-cheap cost model.
(finish_options): Use cheap cost model for
explicit -ftree{,-loop}-vectorize.
gcc/testsuite/ChangeLog:
* c-c++-common/Wstringop-overflow-2.c: Adjust testcase.
* g++.dg/tree-ssa/pr81408.C: Ditto.
* g++.dg/warn/Wuninitialized-13.C: Ditto.
* gcc.dg/Warray-bounds-51.c: Ditto.
* gcc.dg/Warray-parameter-3.c: Ditto.
dave@atlas:~/gnu/gcc/gcc$ git bisect bad
2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit
commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Sep 6 13:48:49 2021 +0800
Enable auto-vectorization at O2 with very-cheap cost model.
gcc/ChangeLog:
* common.opt (ftree-vectorize): Add Var(flag_tree_vectorize).
* doc/invoke.texi (Options That Control Optimization): Update
documents.
* opts.c (default_options_table): Enable auto-vectorization at
O2 with very-cheap cost model.
(finish_options): Use cheap cost model for
explicit -ftree{,-loop}-vectorize.
gcc/testsuite/ChangeLog:
* c-c++-common/Wstringop-overflow-2.c: Adjust testcase.
* g++.dg/tree-ssa/pr81408.C: Ditto.
* g++.dg/warn/Wuninitialized-13.C: Ditto.
* gcc.dg/Warray-bounds-51.c: Ditto.
* gcc.dg/Warray-parameter-3.c: Ditto.
* gcc.dg/Wstringop-overflow-14.c: Ditto.
* gcc.dg/Wstringop-overflow-21.c: Ditto.
* gcc.dg/Wstringop-overflow-68.c: Ditto.
* gcc.dg/Wstringop-overflow-76.c: Ditto.
* gcc.dg/gomp/pr46032-2.c: Ditto.
* gcc.dg/gomp/pr46032-3.c: Ditto.
* gcc.dg/gomp/simd-2.c: Ditto.
* gcc.dg/gomp/simd-3.c: Ditto.
* gcc.dg/graphite/fuse-1.c: Ditto.
* gcc.dg/pr67089-6.c: Ditto.
* gcc.dg/pr82929-2.c: Ditto.
* gcc.dg/pr82929.c: Ditto.
* gcc.dg/store_merging_1.c: Ditto.
* gcc.dg/store_merging_11.c: Ditto.
* gcc.dg/store_merging_13.c: Ditto.
* gcc.dg/store_merging_15.c: Ditto.
* gcc.dg/store_merging_16.c: Ditto.
* gcc.dg/store_merging_19.c: Ditto.
* gcc.dg/store_merging_24.c: Ditto.
* gcc.dg/store_merging_25.c: Ditto.
* gcc.dg/store_merging_28.c: Ditto.
* gcc.dg/store_merging_30.c: Ditto.
* gcc.dg/store_merging_5.c: Ditto.
* gcc.dg/store_merging_7.c: Ditto.
* gcc.dg/store_merging_8.c: Ditto.
* gcc.dg/strlenopt-85.c: Ditto.
* gcc.dg/tree-ssa/dump-6.c: Ditto.
* gcc.dg/tree-ssa/pr19210-1.c: Ditto.
* gcc.dg/tree-ssa/pr47059.c: Ditto.
* gcc.dg/tree-ssa/pr86017.c: Ditto.
* gcc.dg/tree-ssa/pr91482.c: Ditto.
* gcc.dg/tree-ssa/predcom-1.c: Ditto.
* gcc.dg/tree-ssa/predcom-dse-3.c: Ditto.
* gcc.dg/tree-ssa/prefetch-3.c: Ditto.
* gcc.dg/tree-ssa/prefetch-6.c: Ditto.
* gcc.dg/tree-ssa/prefetch-8.c: Ditto.
* gcc.dg/tree-ssa/prefetch-9.c: Ditto.
* gcc.dg/tree-ssa/ssa-dse-18.c: Ditto.
* gcc.dg/tree-ssa/ssa-dse-19.c: Ditto.
* gcc.dg/uninit-40.c: Ditto.
* gcc.dg/unroll-7.c: Ditto.
* gcc.misc-tests/help.exp: Ditto.
* gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Ditto.
* gcc.target/i386/pr34012.c: Ditto.
* gcc.target/i386/pr49781-1.c: Ditto.
* gcc.target/i386/pr95798-1.c: Ditto.
* gcc.target/i386/pr95798-2.c: Ditto.
* gfortran.dg/pr77498.f: Ditto.
gcc/common.opt | 2 +-
gcc/doc/invoke.texi | 8 ++++----
gcc/opts.c | 16 +++++++++++++---
gcc/testsuite/c-c++-common/Wstringop-overflow-2.c | 20 ++++++++++----------
gcc/testsuite/g++.dg/tree-ssa/pr81408.C | 2 +-
gcc/testsuite/g++.dg/warn/Wuninitialized-13.C | 2 +-
gcc/testsuite/gcc.dg/Warray-bounds-51.c | 2 +-
gcc/testsuite/gcc.dg/Warray-parameter-3.c | 4 ++--
gcc/testsuite/gcc.dg/Wstringop-overflow-14.c | 4 ++--
gcc/testsuite/gcc.dg/Wstringop-overflow-21.c | 8 ++++----
gcc/testsuite/gcc.dg/Wstringop-overflow-68.c | 10 +++++-----
gcc/testsuite/gcc.dg/Wstringop-overflow-76.c | 20 ++++++++++----------
gcc/testsuite/gcc.dg/gomp/pr46032-2.c | 2 +-
gcc/testsuite/gcc.dg/gomp/pr46032-3.c | 2 +-
gcc/testsuite/gcc.dg/gomp/simd-2.c | 2 +-
gcc/testsuite/gcc.dg/gomp/simd-3.c | 2 +-
gcc/testsuite/gcc.dg/graphite/fuse-1.c | 2 +-
gcc/testsuite/gcc.dg/pr67089-6.c | 2 +-
gcc/testsuite/gcc.dg/pr82929-2.c | 2 +-
gcc/testsuite/gcc.dg/pr82929.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_1.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_11.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_13.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_15.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_16.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_19.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_24.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_25.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_28.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_30.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_5.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_7.c | 2 +-
gcc/testsuite/gcc.dg/store_merging_8.c | 2 +-
gcc/testsuite/gcc.dg/strlenopt-85.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/dump-6.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr19210-1.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr47059.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr86017.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/pr91482.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/predcom-1.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-3.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-3.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-6.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-8.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/prefetch-9.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c | 2 +-
gcc/testsuite/gcc.dg/uninit-40.c | 2 +-
gcc/testsuite/gcc.dg/unroll-7.c | 2 +-
gcc/testsuite/gcc.misc-tests/help.exp | 2 +-
.../gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr34012.c | 2 +-
gcc/testsuite/gcc.target/i386/pr49781-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr95798-1.c | 2 +-
gcc/testsuite/gcc.target/i386/pr95798-2.c | 2 +-
gcc/testsuite/gfortran.dg/pr77498.f | 2 +-
56 files changed, 98 insertions(+), 88 deletions(-)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (7 preceding siblings ...)
2022-08-04 14:14 ` [Bug tree-optimization/106458] " danglin at gcc dot gnu.org
@ 2022-08-07 22:22 ` danglin at gcc dot gnu.org
2022-08-07 22:23 ` danglin at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-08-07 22:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53422
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53422&action=edit
Tree dump
First tree dumps that differ.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (8 preceding siblings ...)
2022-08-07 22:22 ` danglin at gcc dot gnu.org
@ 2022-08-07 22:23 ` danglin at gcc dot gnu.org
2022-08-10 13:30 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-08-07 22:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> ---
Created attachment 53423
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53423&action=edit
Tree dump
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (9 preceding siblings ...)
2022-08-07 22:23 ` danglin at gcc dot gnu.org
@ 2022-08-10 13:30 ` rguenth at gcc dot gnu.org
2022-08-10 14:53 ` dave.anglin at bell dot net
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-10 13:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
The dump difference is easily explained by taming PRE when -ftree-vectorize is
on, it's not a "real" difference.
When I try with a cc1 cross I see
> ./cc1 -quiet t.i -fpreprocessed -O2 -g -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -fmath-errno -fno-pie -fopt-info-vec
and nothing actually vectorized. Besides the PRE there seems to be a missed
DSE at the end (when vectorization is enabled as after the change):
# DEBUG BEGIN_STMT
memset (&buf.__space.__c, 64, 1024);
# DEBUG BEGIN_STMT
+ sizes[0] = 16;
sizes[1] = 1024;
sizes[2] = 1040;
otherwise I see nothing suspicious in differences in .optimized when
comparing -fdump-tree-optimized with/without -fno-tree-vectorize.
You could try if -fno-tree-pre reproduces it also before the change.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (10 preceding siblings ...)
2022-08-10 13:30 ` rguenth at gcc dot gnu.org
@ 2022-08-10 14:53 ` dave.anglin at bell dot net
2022-08-10 17:38 ` dave.anglin at bell dot net
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 14:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #12 from dave.anglin at bell dot net ---
On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
> When I try with a cc1 cross I see
>
>> ./cc1 -quiet t.i -fpreprocessed -O2 -g -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -fmath-errno -fno-pie -fopt-info-vec
> and nothing actually vectorized. Besides the PRE there seems to be a missed
> DSE at the end (when vectorization is enabled as after the change):
>
> # DEBUG BEGIN_STMT
> memset (&buf.__space.__c, 64, 1024);
> # DEBUG BEGIN_STMT
> + sizes[0] = 16;
> sizes[1] = 1024;
> sizes[2] = 1040;
>
> otherwise I see nothing suspicious in differences in .optimized when
> comparing -fdump-tree-optimized with/without -fno-tree-vectorize.
I had tried -fno-tree-vectorize and it made no difference to the test. So, it
seems GCC is miscompiled
with the -ftree-vectorize change. I thought of building GCC with
-fno-tree-vectorize as a test.
>
> You could try if -fno-tree-pre reproduces it also before the change.
>
Will try.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (11 preceding siblings ...)
2022-08-10 14:53 ` dave.anglin at bell dot net
@ 2022-08-10 17:38 ` dave.anglin at bell dot net
2022-08-10 18:12 ` dave.anglin at bell dot net
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 17:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #13 from dave.anglin at bell dot net ---
On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
> You could try if -fno-tree-pre reproduces it also before the change.
It doesn't.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (12 preceding siblings ...)
2022-08-10 17:38 ` dave.anglin at bell dot net
@ 2022-08-10 18:12 ` dave.anglin at bell dot net
2022-08-10 20:53 ` dave.anglin at bell dot net
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #14 from dave.anglin at bell dot net ---
On 2022-08-10 1:38 p.m., dave.anglin at bell dot net wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
>
> --- Comment #13 from dave.anglin at bell dot net ---
> On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
>> You could try if -fno-tree-pre reproduces it also before the change.
> It doesn't.
But the test does not fail after the change with -fno-tree-pre.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (13 preceding siblings ...)
2022-08-10 18:12 ` dave.anglin at bell dot net
@ 2022-08-10 20:53 ` dave.anglin at bell dot net
2022-11-05 20:54 ` danglin at gcc dot gnu.org
2022-11-06 6:39 ` pinskia at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: dave.anglin at bell dot net @ 2022-08-10 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
--- Comment #15 from dave.anglin at bell dot net ---
On 2022-08-10 9:30 a.m., rguenth at gcc dot gnu.org wrote:
> hen I try with a cc1 cross I see
>
>> ./cc1 -quiet t.i -fpreprocessed -O2 -g -std=gnu11 -fgnu89-inline -fmerge-all-constants -frounding-math -fno-stack-protector -fno-common -fmath-errno -fno-pie -fopt-info-vec
> and nothing actually vectorized. Besides the PRE there seems to be a missed
> DSE at the end (when vectorization is enabled as after the change):
>
> # DEBUG BEGIN_STMT
> memset (&buf.__space.__c, 64, 1024);
> # DEBUG BEGIN_STMT
> + sizes[0] = 16;
> sizes[1] = 1024;
> sizes[2] = 1040;
>
> otherwise I see nothing suspicious in differences in .optimized when
> comparing -fdump-tree-optimized with/without -fno-tree-vectorize.
>
I'm not sure what's going on with the sizes[0] statement but the main
difference in .optimize with and without pre
seems to be in the handling of the old_length variable in do_test:
Removing basic block 86
int do_test ()
{
- unsigned int ivtmp.23;
- size_t old_length;
+ unsigned int ivtmp.28;
void * r;
void * c;
size_t l;
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (14 preceding siblings ...)
2022-08-10 20:53 ` dave.anglin at bell dot net
@ 2022-11-05 20:54 ` danglin at gcc dot gnu.org
2022-11-06 6:39 ` pinskia at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-11-05 20:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #17 from John David Anglin <danglin at gcc dot gnu.org> ---
glibc issue:
commit 8c77e26ba8b360c851b2b9485bb4431aacc51ad1
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Tue Oct 11 13:23:25 2022 +0100
Remove unused scratch_buffer_dupfree
Turns out scratch_buffer_dupfree internal API was unused since
commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f
stdlib: Simplify buffer management in canonicalize
And the related test in malloc/tst-scratch_buffer had issues
so it's better to remove it completely.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
` (15 preceding siblings ...)
2022-11-05 20:54 ` danglin at gcc dot gnu.org
@ 2022-11-06 6:39 ` pinskia at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-06 6:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |MOVED
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2022-11-06 6:39 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 19:40 [Bug target/106458] New: [12 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12 danglin at gcc dot gnu.org
2022-07-27 19:41 ` [Bug target/106458] " danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
2022-07-27 19:42 ` danglin at gcc dot gnu.org
2022-07-28 8:12 ` [Bug target/106458] [12/13 " rguenth at gcc dot gnu.org
2022-07-29 12:50 ` dave.anglin at bell dot net
2022-07-29 14:46 ` dave.anglin at bell dot net
2022-07-30 7:09 ` sam at gentoo dot org
2022-08-04 14:14 ` [Bug tree-optimization/106458] " danglin at gcc dot gnu.org
2022-08-07 22:22 ` danglin at gcc dot gnu.org
2022-08-07 22:23 ` danglin at gcc dot gnu.org
2022-08-10 13:30 ` rguenth at gcc dot gnu.org
2022-08-10 14:53 ` dave.anglin at bell dot net
2022-08-10 17:38 ` dave.anglin at bell dot net
2022-08-10 18:12 ` dave.anglin at bell dot net
2022-08-10 20:53 ` dave.anglin at bell dot net
2022-11-05 20:54 ` danglin at gcc dot gnu.org
2022-11-06 6:39 ` pinskia 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).