Hi,
I have added this small patch (attached). Unfortunately I got regressions
some in iso_fortran_env_8.f90
and several in unsigned_NN.f90 tests.
Just retesting w/o my patch and already seeing the iso_fortran_env one again.
I am also not totally sure, that I applied both your patches correctly. But
they applied w/o issues with patch -p0.
Regards,
Andre
On Wed, 8 Jan 2025 15:26:58 +0100
Jakub Jelinek <[email protected]> wrote:
> On Wed, Jan 08, 2025 at 03:16:46PM +0100, Mikael Morin wrote:
> > I think your patch is enough, we don't need to target same-bytes formats
> > between module versions.
>
> I can confirm the ICE on the small reproducer I've posted is gone with the
> https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672901.html
> https://gcc.gnu.org/pipermail/gcc-patches/2025-January/672905.html
> patches.
>
> So, is the first one ok for trunk (that is one I've fully tested already)
> and the second one too if it passes bootstrap/regtest?
>
> Jakub
>
--
Andre Vehreschild * Email: vehre ad gmx dot de
From 10e43b4c5953a30a2fb6c89dc815290484f29d54 Mon Sep 17 00:00:00 2001
From: Andre Vehreschild <[email protected]>
Date: Wed, 8 Jan 2025 14:58:35 +0100
Subject: [PATCH] Fortran: Cylce detection for non vtypes/pdts only. [PR118337]
gcc/fortran/ChangeLog:
PR fortran/118337
* resolve.cc (resolve_fl_derived0): Exempt vtypes and pdt_types
from cycle detection.
---
gcc/fortran/resolve.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 6dcda70679f..0055654d014 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -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 || sym->attr.pdt_type))
+ resolve_cyclic_derived_type (sym);
c = (sym->attr.is_class) ? CLASS_DATA (sym->components)
: sym->components;
--
2.47.1