https://gcc.gnu.org/g:98140b2b7c509840650d3612905a001d506ac408
commit 98140b2b7c509840650d3612905a001d506ac408 Author: Mikael Morin <[email protected]> Date: Thu Nov 12 16:08:26 2026 +0100 Non suppression assertion pour fonctions Diff: --- gcc/fortran/trans-types.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index 889392485248..ca80d78563a0 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -1804,8 +1804,11 @@ gfc_get_dtype_rank_type (int rank, tree etype) size = gfc_get_character_len_in_bytes (ptype); break; case BT_VOID: - if (TREE_CODE (ptype) == POINTER_TYPE) - size = size_in_bytes (ptype); + if (TREE_CODE (etype) != VOID_TYPE) + { + gcc_assert (TREE_CODE (ptype) == POINTER_TYPE); + size = size_in_bytes (ptype); + } break; case BT_CLASS: /* For classes, the element length isn't a known constant, we set it to
