From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11624 invoked by alias); 11 Jun 2013 10:01:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 11601 invoked by uid 89); 11 Jun 2013 10:00:59 -0000 X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 3 recipients Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 11 Jun 2013 10:00:58 +0000 Received: from archimedes.net-b.de (port-92-195-31-211.dynamic.qsc.de [92.195.31.211]) by mx02.qsc.de (Postfix) with ESMTP id 67D68247DA; Tue, 11 Jun 2013 12:00:52 +0200 (CEST) Message-ID: <51B6F553.4000008@net-b.de> Date: Tue, 11 Jun 2013 10:01:00 -0000 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Mikael Morin CC: gcc patches , gfortran , Janus Weil Subject: Re: [Patch, Fortran] PR57508 - Fix ICE/Reject-valid issue with get_temp_from_expr (intrinsic assignment with defined assignment) References: <51ACA2CB.6010601@net-b.de> <51B441D6.9030200@sfr.fr> In-Reply-To: <51B441D6.9030200@sfr.fr> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-06/txt/msg00571.txt.bz2 Hello Mikael, Mikael Morin wrote: > Le 03/06/2013 16:06, Tobias Burnus a écrit : >> diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c >> index b2e8fdc..655d3c1 100644 >> --- a/gcc/fortran/resolve.c >> +++ b/gcc/fortran/resolve.c >> @@ -9293,8 +9293,12 @@ get_temp_from_expr (gfc_expr *e, gfc_namespace *ns) >> } >> } >> >> /* Add the attributes and the arrayspec to the temporary. */ >> /* Add the attributes and the arrayspec to the temporary. */ >> tmp->n.sym->attr = gfc_expr_attr (e); >> + tmp->n.sym->attr.function = 0; >> + tmp->n.sym->attr.result = 0; >> + tmp->n.sym->attr.flavor = FL_VARIABLE; >> + >> if (as) >> { >> tmp->n.sym->as = gfc_copy_array_spec (as); > This fixes the problem, but shouldn't the fix be in gfc_expr_attr instead? > It seems to me that most symbol attributes don't make sense in any case > for non-variables, except for some of the standard ones > (allocatable,...) and possibly a couple more. I will audit the use of gfc_expr_attr and send an updated patch later. Is the current patch okay for GCC 4.8? I prefer simpler patches for the branch. Tobias PS: Still pending review: [Patch, Fortran] PR57535 - Fix class-array handling for function result variables, http://gcc.gnu.org/ml/fortran/2013-06/msg00053.html