Bug 110697 - [14 Regression] bootstrap failure on gcc/tree-ssa-loop-ivcanon.cc:1170 error: variable 'entry_count' set but not used [-Werror=unused-but-set-variable]
Summary: [14 Regression] bootstrap failure on gcc/tree-ssa-loop-ivcanon.cc:1170 error:...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 14.0
: P1 normal
Target Milestone: 14.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
: 110698 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-17 06:36 UTC by Sergei Trofimovich
Modified: 2023-07-17 15:26 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich 2023-07-17 06:36:14 UTC
Noticed bootstrap build failure today on r14-2553-ga5088dc3f5ef73 :

$ ~/dev/git/gcc/configure --disable-multilib
$ make

/tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++ -B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu  -I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include  -I/home/slyfox/dev/git/gcc/libstdc++-v3/libsupc++ -L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -fno-PIE -c   -g -O2 -fno-checking -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -fno-PIE -I. -I. -I/home/slyfox/dev/git/gcc/gcc -I/home/slyfox/dev/git/gcc/gcc/. -I/home/slyfox/dev/git/gcc/gcc/../include  -I/home/slyfox/dev/git/gcc/gcc/../libcpp/include -I/home/slyfox/dev/git/gcc/gcc/../libcody  -I/home/slyfox/dev/git/gcc/gcc/../libdecnumber -I/home/slyfox/dev/git/gcc/gcc/../libdecnumber/bid -I../libdecnumber -I/home/slyfox/dev/git/gcc/gcc/../libbacktrace   -o tree-ssa-loop-ivcanon.o -MT tree-ssa-loop-ivcanon.o -MMD -MP -MF ./.deps/tree-ssa-loop-ivcanon.TPo /home/slyfox/dev/git/gcc/gcc/tree-ssa-loop-ivcanon.cc
/home/slyfox/dev/git/gcc/gcc/tree-ssa-loop-ivcanon.cc: In function 'bool try_peel_loop(loop*, edge, tree, bool, long int)':
/home/slyfox/dev/git/gcc/gcc/tree-ssa-loop-ivcanon.cc:1170:17: error: variable 'entry_count' set but not used [-Werror=unused-but-set-variable]
 1170 |   profile_count entry_count = profile_count::zero ();
      |                 ^~~~~~~~~~~

$ prev-gcc/xg++ -Bprev-gcc -v
Reading specs from prev-gcc/specs
COLLECT_GCC=prev-gcc/xg++
COLLECT_LTO_WRAPPER=prev-gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230717 (experimental) (GCC)
Comment 1 Andrew Pinski 2023-07-17 07:43:05 UTC
*** Bug 110698 has been marked as a duplicate of this bug. ***
Comment 2 Tobias Burnus 2023-07-17 12:36:12 UTC
Should be FIXED

by commit r14-2581-g3b9cd125cfca44d3ae18f409fb20b5c094829e41
"Restore bootstrap by removing unused variable in tree-ssa-loop-ivcanon.cc"

Cf. https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624677.html
Comment 3 Sergei Trofimovich 2023-07-17 15:26:10 UTC
I confirm this fixed the bootstrap for me. Thank you!