https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121728
Bug ID: 121728
Summary: [PDT] Testcase gfortran.dg/pr95090.f90 ICEs under
valgrind
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: anlauf at gcc dot gnu.org
Target Milestone: ---
As I did see gfortran.dg/pr95090.f90 failing on some targets, I did run
f951 on it under valgrind and reduced it to the following:
module m
type t(n)
integer, len :: n = 8
end type
contains
subroutine s
type(t(n)) :: z
end
end
Without valgrind, it succeeds and creates a module file "m.mod", but running
under valgrind it ICEs and creates an empty file "m.mod0" and gives the
following traceback here (valgrind portions elided):
f951: internal compiler error: write_symbol(): bad module symbol 'n'
0xb37c9d diagnostic_report_diagnostic(diagnostics::context*,
diagnostics::diagnostic_info*)
../../gcc-trunk/gcc/diagnostic.h:178
0xb37c9d gfc_report_diagnostic
../../gcc-trunk/gcc/fortran/error.cc:250
0xb37c9d gfc_internal_error(char const*, ...)
../../gcc-trunk/gcc/fortran/error.cc:841
0xb83917 write_symbol
../../gcc-trunk/gcc/fortran/module.cc:6280
0xb83961 write_symbol1_recursion
../../gcc-trunk/gcc/fortran/module.cc:6507
0xb87b19 write_symbol1
../../gcc-trunk/gcc/fortran/module.cc:6540
0xb87b19 write_module
../../gcc-trunk/gcc/fortran/module.cc:6698
0xb87b19 dump_module
../../gcc-trunk/gcc/fortran/module.cc:6827
0xb8817d gfc_dump_module(char const*, int)
../../gcc-trunk/gcc/fortran/module.cc:6884
0xbb6845 gfc_parse_file()
../../gcc-trunk/gcc/fortran/parse.cc:7705
0xc10bff gfc_be_parse_file
../../gcc-trunk/gcc/fortran/f95-lang.cc:247