Re: [PATCH] fortran: gfc_trans_subcomponent_assign fixes [PR113503]

2024-02-17 Thread Jakub Jelinek
On Sat, Feb 17, 2024 at 04:05:16PM +0100, Harald Anlauf wrote: > > +program pr113503 > > + implicit none > > + type :: T > > +character(len=:), allocatable :: u > > + end type > > + character(len=20) :: us(1) = 'foobar' > > + type(T) :: x > > + x = T(u = trim (us(1))) ! { dg-bogus "is

Re: [PATCH] fortran: gfc_trans_subcomponent_assign fixes [PR113503]

2024-02-17 Thread Harald Anlauf
Hi Jakub, On 2/17/24 10:02, Jakub Jelinek wrote: Hi! The r14-870 changes broke xtb package tests (reduced testcase is the first one below) and caused ICEs on a test derived from that (the second one). [...] thanks for your detailed analysis and for the patch, which puts things in straight

[PATCH] fortran: gfc_trans_subcomponent_assign fixes [PR113503]

2024-02-17 Thread Jakub Jelinek
Hi! The r14-870 changes broke xtb package tests (reduced testcase is the first one below) and caused ICEs on a test derived from that (the second one). For the x = T(u = trim (us(1))) statement, before that change gfortran used to emit weird code with 2 trim calls: _gfortran_string_trim