https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102241

Oliver Jahn <oliverjahn at proton dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oliverjahn at proton dot me

--- Comment #4 from Oliver Jahn <oliverjahn at proton dot me> ---
Same error with gfortran 14.1.0 on x86_64-pc-linux-gnu.  Not sure it helps, but
I can get an error message instead of ICE if I use the pointer version of the
t2 type in a module subroutine:

    MODULE mo
      TYPE t1(n)
        INTEGER, LEN :: n
        INTEGER :: a(n)
      END TYPE

      TYPE t2
        TYPE(t1(1)), POINTER :: p_t1
      END TYPE

      type(t1(1)), target :: t
      type(t2) :: pt

    CONTAINS

      SUBROUTINE SR
        pt%p_t1 => t
      END SUBROUTINE
    END MODULE

gives

mo.f90:17:8:

   17 |         pt%p_t1 => t
      |        1
Error: Different types in pointer assignment at (1); attempted assignment of
TYPE(Pdtt1) to TYPE(t1)

and the same with deferred type parameter in t2.

Reply via email to