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

            Bug ID: 128037
           Summary: valgrind error in resolve_assoc_var(gfc_symbol*, bool)
                    (resolve.cc:11052)
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 65907
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65907&action=edit
f90 source code

The attached F90 code, from the Fujitsu testsuite file
Fortran/0239/0239_0159.f90, does this with recent gfortran
(with valgrind enabled).

$ ~/gcc/results.20261020.valgrind/bin/gfortran -w -c Fortran/0239/0239_0159.f90
==1773058== Invalid read of size 8
==1773058==    at 0x58CA57: resolve_assoc_var(gfc_symbol*, bool)
(resolve.cc:110
52)
==1773058==    by 0x577985: resolve_symbol(gfc_symbol*) (resolve.cc:18810)
==1773058==    by 0x5AB612: do_traverse_symtree(gfc_symtree*, void
(*)(gfc_symtr
ee*), void (*)(gfc_symbol*)) (symbol.cc:4592)
==1773058==    by 0x589815: resolve_types(gfc_namespace*) (resolve.cc:20878)

git blame says:

5c60dbc14b42 gcc/fortran/resolve.c  (Paul Thomas                2018-02-19
22:09:13 +0000 11052)       if (!sym->ts.u.cl->length

Compiler version is

$ ~/gcc/results.20261020.valgrind/bin/gfortran -v 2>&1 | grep exp
gcc version 17.0.0 20261019 (experimental) (708cc223b0f8b96c) 
fortran $

Reply via email to