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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |janus at gcc dot gnu.org
            Summary|[OOP] copy class(*)         |[OOP] runtime segfault with
                   |component from type with a  |CLASS(*), INTENT(OUT) dummy
                   |subroutine                  |argument

--- Comment #2 from janus at gcc dot gnu.org ---
I could boil it down to this much simpler case:

PROGRAM main
  IMPLICIT NONE
  INTEGER :: x, y
  x = 5
  CALL copy(x,y)
  PRINT *,y
contains
  SUBROUTINE copy(a,b)
    integer, INTENT(IN) :: a
    CLASS(*), INTENT(OUT) :: b
    SELECT TYPE(b); TYPE IS(integer)
      b = a
    END SELECT
  END SUBROUTINE
END

Segfaults with 4.8, 4.9 and trunk. Earlier versions don't support unlimited
polymorphism.

Had a quick look over the dump, but could not directly see where things go
wrong.

Reply via email to