[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    Re: [PATCH, part 2] PR 102458 - issues with simplification of SIZE intrinsic applied to automatic ar
From:       Tobias Burnus <tobias () codesourcery ! com>
Date:       2021-09-30 17:03:05
Message-ID: f4dc0d25-0a3a-2ab6-8319-330460fc4201 () codesourcery ! com
[Download RAW message or body]

Dear Harald, dear all,

On 29.09.21 21:20, Harald Anlauf via Fortran wrote:
> I think I have solved the remaining issue in PR 102458 that prevented the
> simplification of an expression involving a static initialization and the
> evaluation of the SIZE of an automatic array which has provable constant
> size.  My previous related query to the ML has thus become obsolete.
>
> My solution is to attempt the resolution of the array specification
> within simplify_size so that the simplification actually works.
>
> Regtested on x86_64-pc-linux-gnu.  OK for mainline and same branches
> as the patch for part1?

Thanks. I wonder whether that should be placed at some more generic
place, but for now add it to another intrinsic-simplify function ...

I note that this resolution is also used for (u,l)(,co)bounds/this_image
(via simplify_bound_dim) and in gfc_resolve_formal_arglist,
resolve_component, resolve_symbol.

OK.

Thanks,

Tobias

> Fortran: resolve expressions during SIZE simplification
> gcc/fortran/ChangeLog:
>
>       PR fortran/102458
>       * simplify.c (simplify_size): Resolve expressions used in array
>       specifications so that SIZE can be simplified.
>
> gcc/testsuite/ChangeLog:
>
>       PR fortran/102458
>       * gfortran.dg/pr102458b.f90: New test.
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201=
, 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3=
=A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf=
t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic