MODULE test_complex
  IMPLICIT NONE
  PRIVATE
  PUBLIC :: ice
  SAVE
CONTAINS
  SUBROUTINE ice(c)
    COMPLEX(8), INTENT(OUT) :: c

    COMPLEX(8) :: y
    REAL(8)    :: x

    x = 1.0_8

    x = 1.0_8

    ! This is not a problem!
    y%re = x
    y%im = x

    ! Comment out these two lines and the ICE disappears
    c%re = x
    c%im = x
    RETURN
  END SUBROUTINE ice
END MODULE test_complex

PROGRAM test
  COMPLEX(8) :: h
  REAL(8)    :: x, y

  ! This is not a problem!
  x = 1.0_8
  h%re = x
  h%im = c
END PROGRAM test
