This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] Fix character length in constructors
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Thomas Koenig <tkoenig at netcologne dot de>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Feb 2018 07:29:06 -0800
- Subject: Re: [patch, fortran] Fix character length in constructors
- Authentication-results: sourceware.org; auth=none
- References: <a4470f1d-a946-a5bf-7934-5ef8e88ac3d9@netcologne.de> <CAO9iq9EdSx-07ni3CbBrUzxnVLme-ynSfTrt-r+D_zx95PgU8Q@mail.gmail.com>
- Reply-to: sgk at troutmask dot apl dot washington dot edu
On Tue, Feb 20, 2018 at 09:51:14AM +0200, Janne Blomqvist wrote:
> On Tue, Feb 20, 2018 at 12:41 AM, Thomas Koenig <tkoenig@netcologne.de> wrote:
> > Hello world,
> >
> > when putting in a seemingly innocent simplification for PR 56342,
> > I caused a regression in PR 82823, in PACK. The root cause of
> > this one turned out to be PR 48890, in which structure
> > constructors containing characters were not handled correctly
> > if the lengths did not match.
> >
> > The attached patch fixes that.
> >
> > Regression-tested. OK for trunk?
>
> It's better to use gfc_mpz_get_hwi() instead of mpz_get_si().
> mpz_get_si() returns a long, which is a 32-bit type on win64.
>
> Otherwise Ok with the spelling fix suggested by Steve.
>
Good catch. I don't know how I forgot that you've
spent a lot time fixing int, long, size_t, ssize_t
issues.
--
Steve