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

--- Comment #9 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Simon Martin from comment #8)
> [...]
> How do you reproduce this? Are you configuring with
> --with-build-config=bootstrap-lto?

Sorry for the delay -- I just confirmed I can reproduce it on trunk with just
./configure --with-build-config="bootstrap-lto":

```
/tmp/build/./prev-gcc/xg++ -B/tmp/build/./prev-gcc/
-B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-I/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/home/sam/git/gcc/libstdc++-v3/libsupc++
-L/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -fno-PIE -c
 -DIN_GCC_FRONTEND -g -O2 -fno-checking -flto=jobserver -frandom-seed=1
-DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
-Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings  -DHAVE_CONFIG_H -fno-PIE -I. -I.
-I/home/sam/git/gcc/gcc -I/home/sam/git/gcc/gcc/.
-I/home/sam/git/gcc/gcc/../include  -I/home/sam/git/gcc/gcc/../libcpp/include
-I/home/sam/git/gcc/gcc/../libcody  -I/home/sam/git/gcc/gcc/../libdecnumber
-I/home/sam/git/gcc/gcc/../libdecnumber/bid -I../libdecnumber
-I/home/sam/git/gcc/gcc/../libbacktrace   -o cc1plus-checksum.o -MT
cc1plus-checksum.o -MMD -MP -MF ./.deps/cc1plus-checksum.TPo
cc1plus-checksum.cc
make[3]: Leaving directory '/tmp/build/gcc'
/tmp/build/./prev-gcc/xg++ -B/tmp/build/./prev-gcc/
-B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-I/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/home/sam/git/gcc/libstdc++-v3/libsupc++
-L/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/tmp/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -no-pie   -g
-O2 -fno-checking -flto=jobserver -frandom-seed=1 -DIN_GCC    -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-error=narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings  -DHAVE_CONFIG_H -no-pie
-static-libstdc++ -static-libgcc  -o cc1plus \
      cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/class.o cp/constexpr.o
cp/constraint.o cp/coroutines.o cp/cp-gimplify.o cp/cp-objcp-common.o
cp/cp-ubsan.o cp/cvt.o cp/contracts.o cp/cxx-pretty-print.o cp/decl.o
cp/decl2.o cp/dump.o cp/error.o cp/except.o cp/expr.o cp/friend.o cp/init.o
cp/lambda.o cp/lex.o cp/logic.o cp/mangle.o cp/mapper-client.o
cp/mapper-resolver.o cp/method.o cp/module.o cp/name-lookup.o cp/optimize.o
cp/parser.o cp/pt.o cp/ptree.o cp/rtti.o cp/search.o cp/semantics.o cp/tree.o
cp/typeck.o cp/typeck2.o cp/vtable-class-hierarchy.o attribs.o
c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o
c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o
c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o
c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o
c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o
c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o
c-family/c-spellcheck.o c-family/c-type-mismatch.o i386-c.o glibc-c.o
cc1plus-checksum.o libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcody/libcody.a \
        libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp
-rdynamic  -L./../zlib -lz -lzstd
In function ‘release’,
    inlined from ‘release’ at /home/sam/git/gcc/gcc/vec.h:2027:20,
    inlined from ‘__dt_base ’ at /home/sam/git/gcc/gcc/vec.h:1686:19,
    inlined from ‘can_be_handled’ at
/home/sam/git/gcc/gcc/tree-switch-conversion.cc:1890:1:
/home/sam/git/gcc/gcc/vec.h:347:10: warning: ‘free’ called on unallocated
object ‘dest_bbs’ [-Wfree-nonheap-object]
  347 |   ::free (v);
      |          ^
/home/sam/git/gcc/gcc/tree-switch-conversion.cc: In function ‘can_be_handled’:
/home/sam/git/gcc/gcc/tree-switch-conversion.cc:1862:39: note: declared here
 1862 |   auto_vec<int, m_max_case_bit_tests> dest_bbs;
      |                                       ^
```

Reply via email to