Regression in 19.0: intrinsic assignment of a DT involving LHS allocation fails if a component DT includes defined assignment
Shown below is a minimal reproducer of an issue extracted from another thread. It works as expected using Intel Fortran 18.0 update 3: A support request has been submitted with Intel.
type :: a
integer :: i = 0
type :: b
integer, allocatable :: j(:)
procedure :: assign_b
generic :: assignment(=) => assign_b !<-- Comment this line and this test works
type :: c
type(a) :: foo
type(b) :: bar
elemental subroutine assign_b( lhs, rhs )
class(b), intent(inout) :: lhs
type(b), intent(in) :: rhs
end module m
use m, only : c
type(c) :: x(2)
type(c), allocatable :: y(:)
x%foo%i = [ 1, 2 ]
y = x
print *, "y%foo%i = ", y%foo%i, "; expected = ", x%foo%i
if ( any(y%foo%i /= x%foo%i) ) stop "FAILURE"
With 19.0 release,
C:\Temp>ifort /standard-semantics p.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R
) 64, Version 184.108.40.206 Build 20180804
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
Microsoft (R) Incremental Linker Version 14.14.26433.0
Copyright (C) Microsoft Corporation. All rights reserved.
y%foo%i = 2 6226020 ; expected = 1 2