Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Paul Richard Thomas
Hi Harald, Thank you for the review and for the testing to destruction. Both issues are fixed in the attached patch. Note the new function 'h', which both tests that the namespace confusion is fixed and that the elemental-ness of LEN_TRIM is respected. The patch continues to regtest OK. If I don'

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Andre Vehreschild
Hi Paul, I am missing an attachment or is the change to small, that I've overlooked it :-) - Andre On Mon, 15 Jul 2024 09:21:54 +0100 Paul Richard Thomas wrote: > Hi Harald, > > Thank you for the review and for the testing to destruction. Both issues > are fixed in the attached patch. Note the

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Paul Richard Thomas
I've done it again! Patch duly added. Paul On Mon, 15 Jul 2024 at 09:21, Paul Richard Thomas < paul.richard.tho...@gmail.com> wrote: > Hi Harald, > > Thank you for the review and for the testing to destruction. Both issues > are fixed in the attached patch. Note the new function 'h', which both

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Andre Vehreschild
Hi Paul, I tried to "break" your patch, but I failed. (I tried having same function in both modules with identical signature; but I do not get a symbol collision). So to me the patch looks fine now. But you may want to give Harald some time for a look. Thanks for the patch, Andre On Mon,

RE: Lower zeroing array assignment to memset for allocatable arrays

2024-07-15 Thread Prathamesh Kulkarni
> -Original Message- > From: Harald Anlauf > Sent: Saturday, July 13, 2024 1:15 AM > To: Prathamesh Kulkarni ; gcc- > patc...@gcc.gnu.org; fortran@gcc.gnu.org > Subject: Re: Lower zeroing array assignment to memset for allocatable > arrays > > External email: Use caution opening links or

[Patch, fortran] PR115070 (and PR115348) - [13/14/15 Regression] ICE using IEEE_ARITHMETIC in a derived type method with class, intent(out)

2024-07-15 Thread Paul Richard Thomas
Hi All, I am not sure that I understand why this bug occurs. The regression was introduced by my patch that had gfc_trans_class_init_assign return NULL_TREE, when all the components of the default initializer are NULL. Note that this only afflicts scalar dummy arguments. With pr115070: void my_su

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Harald Anlauf
Hi Paul, Andre, at the risk of getting stoned to death, here's an example: module m implicit none integer :: c contains function f(n) result(z) integer, intent(in) :: n character, parameter :: c(3) = ['x', 'y', 'z'] character(len_trim(c(n))) :: z z = c(n) end function

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Harald Anlauf
Replying to myself: Am 15.07.24 um 19:35 schrieb Harald Anlauf: For '_len_trim_c_k': Breakpoint 1, gfc_create_module_variable (sym=0x32af2f0)     at ../../gcc-trunk/gcc/fortran/trans-decl.cc:5515 5515  gcc_assert (sym->ns->proc_name->attr.flavor == FL_MODULE (gdb) p sym->ns->proc_name->att

Re: Lower zeroing array assignment to memset for allocatable arrays

2024-07-15 Thread Harald Anlauf
Hi Prathamesh! Am 15.07.24 um 15:07 schrieb Prathamesh Kulkarni: -Original Message- From: Harald Anlauf I agree that it is reasonable to defer the handling of arrays as components of derived types, and recommend to do the following: - replace "&& gfc_is_simply_contiguous (expr, true, f

Re: [Patch, fortran] PR84868 - [11/12/13/14/15 Regression] ICE in gfc_conv_descriptor_offset, at fortran/trans-array.c:208

2024-07-15 Thread Harald Anlauf
Am 15.07.24 um 20:27 schrieb Harald Anlauf: Replying to myself: Am 15.07.24 um 19:35 schrieb Harald Anlauf: For '_len_trim_c_k': Breakpoint 1, gfc_create_module_variable (sym=0x32af2f0) at ../../gcc-trunk/gcc/fortran/trans-decl.cc:5515 5515  gcc_assert (sym->ns->proc_name->attr.flavor