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

            Bug ID: 126962
           Summary: valgrind error at cp/pt.cc:26161 in
                    unify_pack_expansion
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

A valgrind build of today's gcc trunk does this:

/home/dcb42/gcc/working/./gcc/xgcc -shared-libgcc
-B/home/dcb42/gcc/working/./gcc -nostdinc++
-L/home/dcb42/gcc/working/x86_64-pc-linux-gnu/libstdc++-v3/src
-L/home/dcb42/gcc/working/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/home/dcb42/gcc/working/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
-B/home/dcb42/gcc/results.20260820.valgrind/x86_64-pc-linux-gnu/bin/
-B/home/dcb42/gcc/results.20260820.valgrind/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb42/gcc/results.20260820.valgrind/x86_64-pc-linux-gnu/include -isystem
/home/dcb42/gcc/results.20260820.valgrind/x86_64-pc-linux-gnu/sys-include    -x
c++-header -nostdinc++ -g -O2 -g1 -O3 -march=native -Wall -D_GNU_SOURCE 
-I/home/dcb42/gcc/working/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/home/dcb42/gcc/working/x86_64-pc-linux-gnu/libstdc++-v3/include
-I/home/dcb42/gcc/trunk/libstdc++-v3/libsupc++  -O2 -g
/home/dcb42/gcc/trunk/libstdc++-v3/include/precompiled/stdc++.h -o
x86_64-pc-linux-gnu/bits/stdc++.h.gch/O2g.gch
yes
checking for ldexp... yes
checking for ldexpl... 
==635021== Invalid read of size 32
==635021==    at 0x6DF956: unify_pack_expansion(tree_node*, tree_node*,
tree_node*, tree_node*, unification_kind_t, bool, bool) (pt.cc:26161)
==635021==    by 0x6C736C: unify(tree_node*, tree_node*, tree_node*,
tree_node*, int, bool) (pt.cc:26933)
==635021==    by 0x6C68D0: unify(tree_node*, tree_node*, tree_node*,
tree_node*, int, bool) (pt.cc:27157)
==635021==    by 0x6C731B: unify(tree_node*, tree_node*, tree_node*,
tree_node*, int, bool) (pt.cc:26927)

The line of code at cp/pt.cc:26161 is

      for (i = 0; i < len && !nondeduced_p; ++i)

Configure line is:

CFLAGS="-g1 -O3 -march=native -Wall" \
CXXFLAGS="-g1 -O3 -march=native -Wall" \
../trunk/configure --prefix=$HOME/gcc/results.$DATE.valgrind \
        --disable-bootstrap \
        --disable-doc \
        --disable-multilib \
        --with-pkgversion=$HASH \
        --enable-checking=valgrind \
        --enable-languages=c,c++,fortran

native is znver3.

Reply via email to