I just added a shorter reproducer (below) to PR 100650. Is this also
related to PR 49324?
Damian
% cat reshape-array-constructor.f90
implicit none
type foo_t
integer, allocatable :: bar(:)
end type
type(foo_t) foo(2,1)
integer :: i, j, n(2,2,1) = reshape([-1,-1,1,1], [2,2,1])
gfortran 12.2 accepts the code below if the "allocatable" attribute is
removed:
% cat gfortran-lock-issue.f90
use iso_fortran_env
type foo
type(lock_type), allocatable :: bar
end type
type(foo) foobar[*]
end
% gfortran -fcoarray=single gfortran-lock-issue.f90
gfortran-lock-issue.f90:
In case it's useful to gfortran developers, the Reference-Counter
repository (https://github.com/sourceryinstitute/reference-counter)
contains a test/compiler_test.f90 file that separately tests each of the
scenarios in which Fortran 2018 clause 7.5.6.3 requires type finalization
to occur. Thanks
mplex = 1028
> CFI_type_double_Complex = 2052
>
> Cheers
>
> Paul
>
>
> On Sun, 6 Feb 2022 at 03:39, Damian Rouson via Fortran <
> fortran@gcc.gnu.org> wrote:
>
>> For an assumed-type, assumed-rank complex dummy argument in a C interface,
>> gfortran 11.2.0
For an assumed-type, assumed-rank complex dummy argument in a C interface,
gfortran 11.2.0 passes a CFI_cdesc_t object with a "type" member that does
not match the corresponding CFI_type_float_Complex and
CFI_type_double_Complex values. In the case of a complex(c_float_complex)
argument, the passed