https://gcc.gnu.org/g:79ef9552ced9933223720357a73404a73caf9668
commit 79ef9552ced9933223720357a73404a73caf9668 Author: Mikael Morin <[email protected]> Date: Thu Nov 12 16:37:32 2026 +0100 Modification assertion, initialization inconditionnelle Diff: --- gcc/fortran/trans-descriptor.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/fortran/trans-descriptor.cc b/gcc/fortran/trans-descriptor.cc index 7c344ce9ccb1..b838962bf065 100644 --- a/gcc/fortran/trans-descriptor.cc +++ b/gcc/fortran/trans-descriptor.cc @@ -961,9 +961,9 @@ void gfc_set_descriptor_from_scalar_class (stmtblock_t *block, tree descr, tree scalar) { - tree class_ref; - if (!is_polymorphic_ref (scalar, &class_ref)) - gcc_unreachable (); + tree class_ref = nullptr;; + bool is_class = is_polymorphic_ref (scalar, &class_ref); + gcc_checking_assert (is_class); tree dtype_val = gfc_get_dtype_rank_type (0, TREE_TYPE (class_ref)); gfc_conv_descriptor_dtype_set (block, descr, dtype_val);
