https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125653
Bug ID: 125653
Summary: [17 regression] glibc printf miscompiled since
r17-1238-g8e3eff39a4564c
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: needs-source, wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Will poke more.
```
~/git/glibc $ git rev-parse HEAD
d0cc9bf859d0434e397530d75a6507f13db79fba
~/build/glibc $ export CFLAGS="-O2"
~/build/glibc $ ~/git/glibc/configure --prefix=/usr
~/build/glibc $ make -j$(nproc) -l$(nproc)
~/build/glibc $ make test t=stdio-common/tst-printf
~/build/glibc $ $ cat stdio-common/tst-printf.test-result
FAIL: stdio-common/tst-printf
original exit status 1
```
```
$ git bisect log
git bisect start
# status: waiting for both good and bad commits
# bad: [cc58cf0d2f9b255e29d9b7a409c5ab31542604d1] Use can_open_code_p in
gimple-ssa-store-merging
git bisect bad cc58cf0d2f9b255e29d9b7a409c5ab31542604d1
# status: waiting for good commit(s), bad commit known
# good: [f20bc4c2fe00928013c533e241b89ae3a6724ca1] AVR: Fix overly long URLs in
the printed PDF documentation
git bisect good f20bc4c2fe00928013c533e241b89ae3a6724ca1
# good: [02b234aba6609b137ddb5e471b550a31cee9ad48] [PATCH] RISC-V: Add tuning
info and vector cost model for xt-c9501fdvt
git bisect good 02b234aba6609b137ddb5e471b550a31cee9ad48
# bad: [3dd180a818e74059c5de878d1557629093aa6748] ada: GNATprove
inlining/unrolling messages now controlled by two Booleans
git bisect bad 3dd180a818e74059c5de878d1557629093aa6748
# bad: [a5ef9099756b58dd91ef76eb767fd3064f4d698d] MAINTAINERS: Add missing
account names
git bisect bad a5ef9099756b58dd91ef76eb767fd3064f4d698d
# bad: [c8ca8e647caf945dc4694107884cf0f4eba5da2f] tree-core: Remove
ENUM_BITFIELD from tree-core.h [PR125507]
git bisect bad c8ca8e647caf945dc4694107884cf0f4eba5da2f
# good: [ee7d0c7b4102b8ef0bcaa725c75e141248b774cb] fortran: also link -lpthread
when -fcoarray=shared is used [PR125324]
git bisect good ee7d0c7b4102b8ef0bcaa725c75e141248b774cb
# bad: [764331d55595e7414886f566e98422f942ea432d] backprop: Rework
SSA-name-to-info mapping
git bisect bad 764331d55595e7414886f566e98422f942ea432d
# good: [3f9e620b52003139f3942113804184b4be56cf31] bitmap: Add
bitmap_clear_last_set_bit
git bisect good 3f9e620b52003139f3942113804184b4be56cf31
# bad: [8e3eff39a4564c76e3b12ae30e370f48200f962c] backprop: Move opt-out for
abnormal edges
git bisect bad 8e3eff39a4564c76e3b12ae30e370f48200f962c
# good: [4fb2541debcca1d1bd7b71b32cee39755f067640] Relax gsi_replace
requirement
git bisect good 4fb2541debcca1d1bd7b71b32cee39755f067640
# first bad commit: [8e3eff39a4564c76e3b12ae30e370f48200f962c] backprop: Move
opt-out for abnormal edges
```
```
Using built-in specs.
COLLECT_GCC=/tmp/gcc-pfx-bad-after/bin/gcc
COLLECT_LTO_WRAPPER=/tmp/gcc-pfx-bad-after/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/sam/git/gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --disable-analyzer
--disable-bootstrap --disable-cet --disable-default-pie --disable-default-ssp
--disable-gcov --disable-libada --disable-libgomp --disable-libitm
--enable-libquadmath --disable-libsanitizer --disable-libssp
--disable-libstdcxx-pch --disable-libvtv --enable-lto --disable-multilib
--disable-nls --disable-objc-gc --disable-systemtap --disable-werror
--enable-languages=c,c++,fortran --prefix=/tmp/gcc-pfx-bad-after
--enable-checking=yes,extra,rtl --without-libbacktrace --without-isl
--without-zstd --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
```