https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87908
--- Comment #12 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
$ MALLOC_PERTURB_=3 valgrind --leak-check=full --track-origins=yes
/home/jerry/dev/usr/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/f951 pr87908.f90
==1255373== Memcheck, a memory error detector
==1255373== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==1255373== Using Valgrind-3.25.1 and LibVEX; rerun with -h for copyright info
==1255373== Command:
/home/jerry/dev/usr/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/f951 pr87908.f90
==1255373==
==1255373== Invalid read of size 1
==1255373== at 0x6AC5C8: check_interface0(gfc_interface*, char const*)
(interface.cc:1971)
==1255373== by 0x6B0E6D: check_sym_interfaces(gfc_symbol*)
(interface.cc:2133)
==1255373== by 0x7614D2: do_traverse_symtree(gfc_symtree*, void
(*)(gfc_symtree*), void (*)(gfc_symbol*)) (symbol.cc:4351)
==1255373== by 0x6B22D0: gfc_check_interfaces(gfc_namespace*)
(interface.cc:2244)
==1255373== by 0x746880: resolve_types(gfc_namespace*) (resolve.cc:19696)
==1255373== by 0x746857: resolve_types(gfc_namespace*) (resolve.cc:19691)
==1255373== by 0x734050: gfc_resolve(gfc_namespace*) [clone .part.0]
(resolve.cc:19797)
==1255373== by 0x71FC1C: gfc_parse_file() (parse.cc:7673)
==1255373== by 0x77BEAF: gfc_be_parse_file() (f95-lang.cc:247)
==1255373== by 0xE771AD: compile_file() (toplev.cc:453)
==1255373== by 0x654E3F: do_compile (toplev.cc:2222)
==1255373== by 0x654E3F: toplev::main(int, char**) (toplev.cc:2385)
==1255373== by 0x6566AA: main (main.cc:39)
...
==1255373==
pr87908.f90:22:20:
22 | procedure g
| 1
Error: Procedure ‘g’ in generic interface '_dtio_formatted_read' at (1) is
neither function nor subroutine
pr87908.f90:37:7:
37 | use m
| 1
Fatal Error: Cannot open module file ‘m.mod’ for reading at (1): No such file
or directory
compilation terminated.
Well we are learning how to 'see' things we would otherwise not see on some
systems.