This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR49906 [4.7/4.8/4.9 Regression] error: size of variable '<anonymous>' is too large
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Harald Anlauf <anlauf at gmx dot de>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Sat, 01 Feb 2014 19:28:47 +0100
- Subject: Re: [Patch, fortran] PR49906 [4.7/4.8/4.9 Regression] error: size of variable '<anonymous>' is too large
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiKx4pK19TL+8ReUeUCREZo3qX9UAEnbw4AC0VbQMa8tQQ at mail dot gmail dot com>
Le 01/02/2014 18:57, Paul Richard Thomas a écrit :
> Dear All,
>
> This regression was flagged by Harald and the trigger, r158683, was
> identified by HJ. Many thanks to both. It surprises me that the bug
> has lain dormant for so long.
>
> The fix is fortunately relatively simple. CHARACTER scalars are, in
> fact arrays in one shape or form and so using them as an SS_REFERENCE
> is bound to fail unless a pointer to the array is stored in the outer
> loop and passed to the ELEMENTAL subroutine/function.
> gfc_conv_string_parameter is equipped to convert CHARACTERs in all
> their manifestations into a pointer, so I have used this. It does not
> work correctly for function results, so this case has been excluded.
>
> Not only does this patch bootstrap and regtest on FC17/x86_64 but all
> the tests in ISO_VARYING_STRING run correctly. This latter is
> important because the suite makes heavy use of elemental functions
> with character arguments.
>
> OK for trunk and, with a decent delay, 4.7 and 4.8?
>
Yes, thanks.
Mikael