Re: [PATCH] Fortran: fix check for non-optional arrays passed to elemental

2025-02-28 Thread Peter Hill
No problem, created PR119054 with a reproducer and some details. Cheers, Peter On Thu, 27 Feb 2025 at 20:45, Jerry D wrote: > > On 2/27/25 12:33 PM, Peter Hill wrote: > > On Thu, 27 Feb 2025 at 18:09, Jerry D wrote: > >> > >> On 2/27/25 7:38 AM, Pe

Re: [PATCH] Fortran: fix check for non-optional arrays passed to elemental

2025-02-27 Thread Peter Hill
On Thu, 27 Feb 2025 at 18:09, Jerry D wrote: > > On 2/27/25 7:38 AM, Peter Hill wrote: > > Dear all, > > > > The attached patch fixes an ICE in gfc_resolve_code when passing an > > optional array to an elemental procedure with `-pedantic` enabled. > > PR95446

[PATCH] Fortran: fix check for non-optional arrays passed to elemental

2025-02-27 Thread Peter Hill
suite/Changelog * gfortran.dg/pr95446.f90: Expand test case to literals and function calls Signed-off-by: Peter Hill --- gcc/fortran/resolve.cc| 4 +++- gcc/testsuite/gfortran.dg/pr95446.f90 | 14 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] Fortran: fix passing array component to polymorphic argument [PR105658]

2024-02-19 Thread Peter Hill
omponents), but in the general case with a type with differently sized components, the stride wouldn't be a multiple of the component's type's size. Is it possible in principle to have an arbitrary stride? Cheers, Peter >From 907a104facfc7f35f48ebcfa9ef5f8f5430d4d3c Mon Sep 17 00:00:00

[PATCH] Fortran: fix passing array component to polymorphic argument [PR105658]

2024-02-15 Thread Peter Hill
Dear all, The attached patch fixes PR105658 by forcing an array temporary to be created. This is required when passing an array component, but this didn't happen if the dummy argument was an unlimited polymorphic type. The problem bit of code is in `gfc_conv_expr_descriptor`, near L7828: s