]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Cylce detection for non vtypes only. [PR118337]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Wed, 8 Jan 2025 13:58:35 +0000 (14:58 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 9 Jan 2025 10:18:43 +0000 (11:18 +0100)
gcc/fortran/ChangeLog:

PR fortran/118337

* resolve.cc (resolve_fl_derived0): Exempt vtypes from cycle
detection.

gcc/fortran/resolve.cc

index 6dcda70679f2465a3374e7c652fcf99f79de6f2e..dab0c3af6018b5d60ae861138fc09dfc0644d820 100644 (file)
@@ -16840,7 +16840,8 @@ resolve_fl_derived0 (gfc_symbol *sym)
 
   /* Resolving components below, may create vtabs for which the cyclic type
      information needs to be present.  */
-  resolve_cyclic_derived_type (sym);
+  if (!sym->attr.vtype)
+    resolve_cyclic_derived_type (sym);
 
   c = (sym->attr.is_class) ? CLASS_DATA (sym->components)
                           : sym->components;