This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PRs 70752 and 72709 - more deferred character length bugs
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 25 Sep 2018 21:41:57 +0300
- Subject: Re: [Patch, fortran] PRs 70752 and 72709 - more deferred character length bugs
- References: <CAGkQGiKuKKOqk+mfrdRSu1+FR6QJcbiswr51p_-=7Xf5Vaa2nA@mail.gmail.com>
On Tue, Sep 25, 2018 at 8:06 PM Paul Richard Thomas <
paul.richard.thomas@gmail.com> wrote:
> This patch is a bit more complicated than some of the previous posts.
> However, the ChangeLog explains the story pretty clearly.
>
> Bootstraps and regtests on FC21/x86_64 - OK for trunk and 8-branch?
>
+ if (expr->ts.kind != 1)
+ {
+ tmp = build_int_cst (gfc_array_index_type, expr->ts.kind);
+ tmp = fold_build2_loc (input_location, MULT_EXPR,
+ gfc_array_index_type,
+ se->string_length, tmp);
+ }
Is se->string_length guaranteed to be of type gfc_array_index_type_here? If
so, why? And if not, maybe a fold_convert is in order?
Otherwise, Ok.
--
Janne Blomqvist