[Bug middle-end/126930] New: valgrind error in pt_solution_includes_global

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=126930

            Bug ID: 126930
           Summary: valgrind error in pt_solution_includes_global
           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 tried 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.20260818.valgrind/x86_64-pc-linux-gnu/bin/
-B/home/dcb42/gcc/results.20260818.valgrind/x86_64-pc-linux-gnu/lib/ -isystem
/home/dcb42/gcc/results.20260818.valgrind/x86_64-pc-linux-gnu/include -isystem
/home/dcb42/gcc/results.20260818.valgrind/x86_64-pc-linux-gnu/sys-include    -g
-O2 -O2  -g -O2 -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 _mulvdi3.o -MT
_mulvdi3.o -MD -MP -MF _mulvdi3.dep -DL_mulvdi3 -c
../../../trunk/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
==2632228== Conditional jump or move depends on uninitialised value(s)
==2632228==    at 0xDB47BC: pt_solution_includes_global(pt_solution*, bool)
(tree-ssa-structalias.cc:1113)
==2632228==    by 0x89CEB1: points_to_local_or_readonly_memory_p(tree_node*)
[clone .part.0] (ipa-fnsummary.cc:2662)
==2632228==    by 0x8A827F: points_to_local_or_readonly_memory_p
(ipa-fnsummary.cc:2649)

Configure script 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. 

The valgrind error happens quite a way into the build.

$ grep "^Config" mk.out 
Configuring in build-x86_64-pc-linux-gnu/libiberty
Configuring in build-x86_64-pc-linux-gnu/libcpp
Configuring in build-x86_64-pc-linux-gnu/fixincludes
Configuring in ./libcody
Configuring in ./zlib
Configuring in ./libiberty
Configuring in ./libdecnumber
Configuring in ./c++tools
Configuring in ./lto-plugin
Configuring in ./libbacktrace
Configuring in ./fixincludes
Configuring in ./libcpp
Configuring in ./gcc
Configuring in ./libcc1
Configuring in x86_64-pc-linux-gnu/libgcc
$

git blame says:

11924f8b487d gcc/tree-ssa-structalias.c  (Richard Biener         2013-11-15
14:48:22 +0000 1113)       || pt->vars_contains_nonlocal
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.