[Bug middle-end/126855] New: valgrind error at prange_storage::set_prange(prange const&) (value-range-storage.cc:713

dcb314 at hotmail dot com via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126855

            Bug ID: 126855
           Summary: valgrind error at prange_storage::set_prange(prange
                    const&) (value-range-storage.cc:713
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I just had a go at a valgrind build of gcc trunk. 
It said:

home/dcb42/gcc/working/./gcc/xgcc -B/home/dcb42/gcc/working/./gcc/
-B/home/dcb42/gcc/results.20260813.valgrind/x86_64-pc-linux-gnu/bin/
-B/home/dcb42/gcc/results.20260813.valgrind/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb42/gcc/results.20260813.valgrind/x86_64-pc-linux-gnu/include -isystem
/home/dcb42/gcc/results.20260813.valgrind/x86_64-pc-linux-gnu/sys-include    -g
-g1 -O2 -march=native -Wall -O2  -g -g1 -O2 -march=native -Wall -DIN_GCC   -W
-Wall -Wno-error=narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fpic
-mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector  -fpic -mlong-double-80 -DUSE_ELF_SYMVER
-fcf-protection -mshstk -I. -I. -I../.././gcc -I../../../trunk/libgcc
-I../../../trunk/libgcc/. -I../../../trunk/libgcc/../gcc
-I../../../trunk/libgcc/../include -I../../../trunk/libgcc/config/i386
-I../../../trunk/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS
 -DUSE_TLS  -o fixddbitint.o -MT fixddbitint.o -MD -MP -MF fixddbitint.dep  -c
../../../trunk/libgcc/soft-fp/fixddbitint.c -fvisibility=hidden -DHIDE_EXPORTS
==82748== Conditional jump or move depends on uninitialised value(s)
==82748==    at 0xF1E1E9: eq_p<generic_wide_int<wide_int_storage>, int>
(wide-int.h:2254)
==82748==    by 0xF1E1E9: operator==<generic_wide_int<wide_int_storage>, int>
(wide-int.h:3852)
==82748==    by 0xF1E1E9: unknown_p (value-range.h:196)
==82748==    by 0xF1E1E9: prange_storage::set_prange(prange const&)
(value-range-storage.cc:713)

Configure line is:

CFLAGS="-g1 -O2 -march=znver3 -Wall" \
CXXFLAGS="-g1 -O2 -march=znver3 -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

To find which part of the build went wrong:

$ grep -E "^==|^Config" mk.out 
Configuring in build-x86_64-pc-linux-gnu/fixincludes
Configuring in build-x86_64-pc-linux-gnu/libiberty
Configuring in build-x86_64-pc-linux-gnu/libcpp
Configuring in ./libdecnumber
Configuring in ./fixincludes
Configuring in ./lto-plugin
Configuring in ./libiberty
Configuring in ./libcody
Configuring in ./libbacktrace
Configuring in ./zlib
Configuring in ./c++tools
Configuring in ./libcpp
Configuring in ./gcc
Configuring in ./libcc1
Configuring in x86_64-pc-linux-gnu/libgcc
==82748== Conditional jump or move depends on uninitialised value(s)
==82748==    at 0xF1E1E9: eq_p<generic_wide_int<wide_int_storage>, int>
(wide-in
t.h:2254)

git log tells me g:424bd64ef45e001c425c18652d0dca1d7ad98928.

I haven't done this valgrind build for many months, so I can't 
tell you when it last worked, but Aldy's range changes
look likely.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.