https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122002
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2025-09-19
--- Comment #10 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to anlauf from comment #5)
> (In reply to Jerry DeLisle from comment #4)
> > Now I wonder why I dont see it here.
>
> Can you run:
>
> valgrind --leak-check=full --track-origins=yes /path/to/f951 -quiet
> -pedantic pdt_13.f03
>
> I get something similar to Sam:
>
> ==17800== Conditional jump or move depends on uninitialised value(s)
> ==17800== at 0x590F46A: __printf_buffer (in /lib64/libc.so.6)
> ==17800== by 0x592A1F8: __vsprintf_internal (in /lib64/libc.so.6)
> ==17800== by 0x590B180: sprintf (in /lib64/libc.so.6)
> ==17800== by 0xA24B24: gfc_get_pdt_instance(gfc_actual_arglist*,
> gfc_symbol**, gfc_actual_arglist**) (decl.cc:4065)
> ==17800== by 0xAC5F35: gfc_match_rvalue(gfc_expr**) (primary.cc:4091)
> ==17800== by 0xA80D12: match_primary (matchexp.cc:217)
> ==17800== by 0xA80D12: match_level_1 (matchexp.cc:267)
> ==17800== by 0xA80D12: match_mult_operand(gfc_expr**) (matchexp.cc:323)
> ==17800== by 0xA80FDC: match_add_operand(gfc_expr**) (matchexp.cc:412)
> ==17800== by 0xA812D9: match_level_2(gfc_expr**) (matchexp.cc:536)
> ==17800== by 0xA814BA: match_level_3(gfc_expr**) (matchexp.cc:607)
> ==17800== by 0xA81602: match_level_4 (matchexp.cc:655)
> ==17800== by 0xA81602: match_and_operand(gfc_expr**) (matchexp.cc:749)
> ==17800== by 0xA817DA: match_or_operand(gfc_expr**) (matchexp.cc:778)
> ==17800== by 0xA818EA: match_equiv_operand(gfc_expr**) (matchexp.cc:821)
> ==17800== Uninitialised value was created by a stack allocation
> ==17800== at 0xA2498F: gfc_get_pdt_instance(gfc_actual_arglist*,
> gfc_symbol**, gfc_actual_arglist**) (decl.cc:3878)
> ==17800==
> ==17800== Use of uninitialised value of size 8
> ==17800== at 0x590436B: _itoa_word (in /lib64/libc.so.6)
> ==17800== by 0x590E913: __printf_buffer (in /lib64/libc.so.6)
> ==17800== by 0x592A1F8: __vsprintf_internal (in /lib64/libc.so.6)
> ==17800== by 0x590B180: sprintf (in /lib64/libc.so.6)
> ==17800== by 0xA24B24: gfc_get_pdt_instance(gfc_actual_arglist*,
> gfc_symbol**, gfc_actual_arglist**) (decl.cc:4065)
> ...
I applied the patch in comment #8 and the valgrind check was better on
pdt_13.f03. However the failure I mentioned to you in separate email comes and
goes.
Running /home/jerry/dev/trunk/gcc/testsuite/gfortran.dg/dg.exp ...
FAIL: gfortran.dg/pdt_48.f03 -O0 execution test
FAIL: gfortran.dg/pdt_48.f03 -O1 execution test
FAIL: gfortran.dg/pdt_48.f03 -O2 execution test
FAIL: gfortran.dg/pdt_48.f03 -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions execution test
FAIL: gfortran.dg/pdt_48.f03 -O3 -g execution test
FAIL: gfortran.dg/pdt_48.f03 -Os execution test
Running /home/jerry/dev/trunk/gcc/testsuite/gfortran.dg/f202y/f202y.exp ...
Apparently somewhat random which makes sense if something is not initialized.