https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128218
--- Comment #6 from Henri Menke <henri at henrimenke dot de> --- (In reply to Harald Anlauf from comment #4) > Can you try a different size (like double or half the size)? I guess you mean use real(4) and complex(4) instead of real(8) and complex(8). No, there is not substantial difference. The generated code remains chaotic in 16.2.1. On top of that when I change integer(8) to integer(4) the generated code becomes even more chaotic. The following 32-bit example also still trips up 17.0.0: https://godbolt.org/z/v1WsfzrzW subroutine g(a, e, z1, z2) real, intent(in) :: a(0:*) integer, value :: e complex, intent(out) :: z1, z2 z1 = transfer(a(e:e+1), z1) ! cmplx(a(e), a(e+1)) z2 = transfer(a(e+2:e+3), z2) ! cmplx(a(e+2), a(e+3)) end subroutine
