On Wed, Mar 19, 2025 at 11:08:58PM +0100, Harald Anlauf wrote:
> 
> the attached patch addresses an actually very long-standing issue
> with bogus bounds checks for components of nested derived types in
> assignments when an intermediate level has the POINTER attribute
> instead of the ALLOCATABLE attribute.  It turned out that the
> check for a reallocatable lhs failed in such situations, as it
> depended on an attribute that is currently not properly set.
> 
> I did not see a way to fix the alloc_comp attribute so that
> it can deal with the current situation and decided to remove
> that check in gfc_is_reallocatable_lhs.
> 
> Regtested on x86_64-pc-linux-gnu.  OK for mainline?

OK.

> As this issue leads to wrong code, is it OK to backport
> e.g. to 14-branch?

Yes, fixing wrong-code bugs can/should be backported.

One question below.

> +program testprog
> +  implicit none
> +
> +  type :: data_node
> +     integer, allocatable :: data(:)
> +  end type data_node

data is of type integer.

> +  allocate (starlist%nodes(2))
> +  starlist%nodes(1)%data = [1., 2., 3.]

Is the floating-point conversion testing some aspect 
of the bugfix that I don't see?


-- 
Steve

Reply via email to