This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR fortran/64124,70409 -- Reduce a charlen
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 7 Mar 2018 09:11:39 +0200
- Subject: Re: [PATCH] PR fortran/64124,70409 -- Reduce a charlen
- Authentication-results: sourceware.org; auth=none
- References: <20180307002019.GA32497@troutmask.apl.washington.edu>
On Wed, Mar 7, 2018 at 2:20 AM, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
> All,
>
> As everyone knows, gfortran reads source into a trees and
> and at some point she passes those trees to a resolution
> phases. There are instances, for example the new tests,
> where resolution fails to use the character length
> parameter in declaration statements. The attach patch
> seems to cure this problem.
>
> Previously, after reading the scalar-integer-expr, gfortran
> would assign the expression to the charlen without trying
> to reduce it to a constant (which should happen but doesn't
> in the resolution phase). The patch now tries to reduce
> the scalar-integer-expr to a constant, and then assigns
> that constant to the charlen.
>
> Bootstrap and regression tested on 7-branch and trunk.
> OK to commit?
>
> 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
>
> PR fortran/64124
> PR fortran/70409
> * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
>
> 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
>
> PR fortran/64124
> PR fortran/70409
> * gfortran.dg/pr64124.f90: New tests.
> * gfortran.dg/pr70409.f90: New tests.
Ok, thanks.
--
Janne Blomqvist