https://gcc.gnu.org/g:de1c63c39743dee96ebda76de86ea513c72c5972

commit de1c63c39743dee96ebda76de86ea513c72c5972
Author: Mikael Morin <[email protected]>
Date:   Mon Sep 22 13:49:39 2025 +0200

    Correction régression iso_fortran_binding_uint8_array.f90

Diff:
---
 gcc/fortran/trans-array.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 04408f6fd5d4..8f6ff9b7ffb7 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -439,7 +439,8 @@ get_CFI_desc (gfc_symbol *sym, gfc_expr *expr,
   if (tmp && DECL_LANG_SPECIFIC (tmp) && GFC_DECL_SAVED_DESCRIPTOR (tmp))
     tmp = GFC_DECL_SAVED_DESCRIPTOR (tmp);
 
-  *desc = tmp;
+  if (desc != nullptr)
+    *desc = tmp;
   return true;
 }

Reply via email to