[Bug fortran/51434] ICE with scalar init of an array parameter, used in DT default init with transfer
sgk at troutmask dot apl.washington.edu
gcc-bugzilla@gcc.gnu.org
Tue Feb 27 15:34:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51434
--- Comment #19 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Feb 27, 2018 at 01:54:11PM +0000, dominiq at lps dot ens.fr wrote:
>
> In addition, I don't understand why
>
> type t
> character :: z
> end type t
> type(t), parameter :: s(5) = t('a')
> type b
> character :: y(5) = transfer('abcde', s(1)%z)
> end type
> type(b) :: zz
> print *, zz
> print *, s(1)%z
> end
>
> prints
>
> aaaaa
> a
>
> Should not it be
>
> abcde
> a
>
No.
Case (i): If MOLD is a scalar and SIZE is absent, the result is a scalar.
print *. s(1)%z, rank(s(1)%z) gives
a 0
More information about the Gcc-bugs
mailing list