This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR65792 - allocation of scalar elemental function with structure constructor fails


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]