This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] PR65792 - allocation of scalar elemental function with structure constructor fails
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Mikael Morin <mikael dot morin at sfr dot fr>, Andre Vehreschild <vehre at gmx 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: Fri, 1 May 2015 20:25:21 +0200
- Subject: Re: [Patch, fortran] PR65792 - allocation of scalar elemental function with structure constructor fails
- Authentication-results: sourceware.org; auth=none
- References: <CAGkQGiKfuxfsnHuwGnsk5R7f=bOu3OzvxtZweL0cGzMmHDGAkQ at mail dot gmail dot com> <20150426185319 dot GA29878 at troutmask dot apl dot washington dot edu> <CAGkQGiK0puVoALMW36TzdoWPE=zw8fNOEu2uzeAEO6CJe2SUoA at mail dot gmail dot com>
Dear All,
By the time I went to commit, something had changed and the patch
caused a regression. I presume that the version that I had of Andre's
patch was not the same as the one committed. I'll cast an eye over it
this weekend and see if I can understand what gives.
Cheers
paul
On 27 April 2015 at 22:42, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
> Dear Steve,
>
> Thanks for the review. I THINK that I know what I meant in the comment
> :-) I will commit tomorrow night.
>
> Cheers
>
> Paul
>
> On 26 April 2015 at 20:53, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote:
>> On Sun, Apr 26, 2015 at 08:35:06PM +0200, Paul Richard Thomas wrote:
>>>
>>> --- 7062,7091 ----
>>> {
>>> if (expr->expr_type != EXPR_STRUCTURE)
>>> {
>>> + tree dealloc = NULL_TREE;
>>> gfc_init_se (&se, NULL);
>>> gfc_conv_expr (&se, expr);
>>> gfc_add_block_to_block (&block, &se.pre);
>>> + /* Prevent repeat evaluations in gfc_copy_alloc_comp by fixing the
>>> + expression in a temporary variable and deallocate is allocatable
>>> + components the copy to the result. */
>>
>> Can you take a second shot at this comment? The "and ..." portions
>> seems to be a little muddled.
>>
>> OK with after comment fix.
>>
>> --
>> Steve
>
>
>
> --
> Outside of a dog, a book is a man's best friend. Inside of a dog it's
> too dark to read.
>
> Groucho Marx
--
Outside of a dog, a book is a man's best friend. Inside of a dog it's
too dark to read.
Groucho Marx