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

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #1)
> Reduced testcase.
> 
> function f(n, x)
>    integer, intent(in) :: n 
>    complex, intent(in) :: x(1:n)
>    real :: f
>    f = g([real(x(1:n)), aimag(x(1:n))])
> end function f
> 
> If the array sections are removed in favor of the whole array,
> the code compiles.

Even further reduction.

subroutine f(n, x)
   integer, intent(in) :: n 
   complex, intent(in) :: x(1:n)
   real :: y(2*n)
   y = [real(x(1:n), aimag(x(1:n))]
end subroutine f

The constructor with array sections is going south.

Reply via email to