https://gcc.gnu.org/g:19ad893aefb8464e80f44486456bcee68618a857

commit 19ad893aefb8464e80f44486456bcee68618a857
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Tue Feb 18 22:27:39 2025 +0100

    Modification nom variable select type

Diff:
---
 gcc/fortran/match.cc | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gcc/fortran/match.cc b/gcc/fortran/match.cc
index 8355a390ee08..eaba692dd81a 100644
--- a/gcc/fortran/match.cc
+++ b/gcc/fortran/match.cc
@@ -7224,6 +7224,22 @@ select_intrinsic_set_tmp (gfc_typespec *ts, const char 
*var_name)
 }
 
 
+static const char *
+get_select_type_var_name ()
+{
+  const char *name = "";
+  gfc_expr *e = gfc_state_stack->construct->expr1;
+  if (e->symtree)
+    name = e->symtree->name;
+  for (gfc_ref *r = e->ref; r; r = r->next)
+    if (r->type == REF_COMPONENT
+       && strcmp (r->u.c.component->name, "_data") != 0)
+      name = r->u.c.component->name;
+
+  return name;
+}
+
+
 /* Set up a temporary for the current TYPE IS / CLASS IS branch .  */
 
 static void

Reply via email to