Re: [PATCH v2] Fortran: Narrow return types [PR78798]

2023-05-14 Thread Mikael Morin
Le 10/05/2023 à 18:47, Bernhard Reutner-Fischer via Fortran a écrit : From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: PR fortran/78798 * array.cc (compare_bounds): Use narrower return type. (gfc_compare_array_spec): Likewise. (is_constant_element): Likewis

Re: [PATCH v2] Fortran: Narrow return types [PR78798]

2023-05-14 Thread Thomas Koenig via Fortran
On 14.05.23 14:27, Mikael Morin wrote: (...) @@ -2098,7 +2098,7 @@ ref_same_as_full_array (gfc_ref *full_ref, gfc_ref *ref)   there is some kind of overlap.   0 : array references are identical or not overlapping.  */ -int +bool   gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc

Re: [PATCH v2] Fortran: Narrow return types [PR78798]

2023-05-14 Thread Bernhard Reutner-Fischer via Fortran
On Sun, 14 May 2023 15:04:15 +0200 Thomas Koenig wrote: > On 14.05.23 14:27, Mikael Morin wrote: > > > > (...) > >> @@ -2098,7 +2098,7 @@ ref_same_as_full_array (gfc_ref *full_ref, > >> gfc_ref *ref) > >>   there is some kind of overlap. > >>   0 : array references are identical o

Re: [PATCH v2] Fortran: Narrow return types [PR78798]

2023-05-14 Thread Mikael Morin
Le 14/05/2023 à 17:24, Bernhard Reutner-Fischer a écrit : On Sun, 14 May 2023 15:04:15 +0200 Thomas Koenig wrote: On 14.05.23 14:27, Mikael Morin wrote: (...) @@ -2098,7 +2098,7 @@ ref_same_as_full_array (gfc_ref *full_ref, gfc_ref *ref)   there is some kind of overlap.   0 :

[PATCH] Fortran: CLASS pointer function result in variable definition context [PR109846]

2023-05-14 Thread Harald Anlauf via Fortran
Dear all, Fortran allows functions in variable definition contexts when the result variable is a pointer. We already handle this for the non-CLASS case (in 11+), but the logic that checks the pointer attribute was looking in the wrong place for the CLASS case. Once found, the fix is simple and o

Re: [PATCH] Fortran: CLASS pointer function result in variable definition context [PR109846]

2023-05-14 Thread Steve Kargl via Fortran
On Sun, May 14, 2023 at 10:04:25PM +0200, Harald Anlauf via Fortran wrote: > > Fortran allows functions in variable definition contexts when the > result variable is a pointer. We already handle this for the > non-CLASS case (in 11+), but the logic that checks the pointer > attribute was looking