[Bug fortran/126170] [17 Regression] LTO ICE in copy_function_or_variable
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 11 20:11:41 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126170
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Jerry DeLisle
<jvdelisle@gcc.gnu.org>:
https://gcc.gnu.org/g:86717c5808dacd36b85e5d4cd3499c6fe96d2733
commit r16-9259-g86717c5808dacd36b85e5d4cd3499c6fe96d2733
Author: Jerry DeLisle <jvdelisle@gcc.gnu.org>
Date: Thu Jul 9 19:24:49 2026 -0700
fortran: [PR126170] Fix LTO ICE in copy_function_or_variable
A redundant USE of a module already visible via host association,
written inside a contained procedure, caused gfortran's module
reader to create a second copy of that module's derived
type.
PR fortran/126170
gcc/fortran/ChangeLog:
PR fortran/126170
* class.cc (gfc_find_derived_vtab): Fix up a stale
non-use-associated duplicate vtab symbol.
(gfc_is_finalizable): Same fix-up, for the finalizer wrapper
symbol.
* module.cc (read_module): Skip re-importing a symbol already
visible via host association from the same module.
gcc/testsuite/ChangeLog:
PR fortran/126170
* gfortran.dg/lto/pr126170_0.f90: New test.
* gfortran.dg/lto/pr126170_1.f90: New test.
(cherry picked from commit f935a7a9013d0748ba1f42dc532df3d278707bf6)
More information about the Gcc-bugs
mailing list