Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-28 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, I'll change to gfc_charlen_type_node. Thanks for your patience in reviewing this patch :-) Cheers Paul On Tue, 27 Jun 2023 at 20:27, Harald Anlauf wrote: > > Hi Paul, > > this is much better now. > > I have only a minor comment left: in the calculation of the > size of a character

Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-27 Thread Harald Anlauf via Gcc-patches
Hi Paul, this is much better now. I have only a minor comment left: in the calculation of the size of a character string you are using an intermediate gfc_array_index_type, whereas I have learned to use gfc_charlen_type_node now, which seems like the natural type here. OK for trunk, and thanks

Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-27 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, Let's try again :-) OK for trunk? Regards Paul Fortran: Enable class expressions in structure constructors [PR49213] 2023-06-27 Paul Thomas gcc/fortran PR fortran/49213 * expr.cc (gfc_is_ptr_fcn): Remove reference to class_pointer. * resolve.cc (resolve_assoc_var): Call gfc_is_

Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-24 Thread Harald Anlauf via Gcc-patches
Hi Paul! On 6/24/23 15:18, Paul Richard Thomas via Gcc-patches wrote: I have included the adjustment to 'gfc_is_ptr_fcn' and eliminating the extra blank line, introduced by my last patch. I played safe and went exclusively for class functions with attr.class_pointer set on the grounds that these

[Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-24 Thread Paul Richard Thomas via Gcc-patches
Hi All, I was looking through Neil Carlson's collection of gfortran bugs and was shocked to find this rather fundamental PR. At 12 years old, it is certainly a "golden oldie"! The patch is rather straightforward and seems to do the job of admitting derived, intrinsic and character expressions to