https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92753
--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> --- Created attachment 47497 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47497&action=edit Provisional patch for the PR The attached patch fixes the bugs in this PR. However, complex components of derived type parameters seem to cause problems that I cannot fathom. module m type t character(3) :: c end type type u complex :: z end type type(t), parameter :: x = t('abc') integer, parameter :: l = x%c%len ! Used to ICE type(u), parameter :: z = u((42.0,-42.0)) end program p use m call s(x%c%len) ! ditto print *, z%z%re ! <<<< this gives a wrong result while %im causes a segfault contains subroutine s(n) if (n .ne. l) stop 1 end end The problems arise in the mpfr_set's in expr.c:1815-1837. Suggestions welcome!