From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80134 invoked by alias); 19 Jun 2016 09:18:24 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 80036 invoked by uid 89); 19 Jun 2016 09:18:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=aldotgccgnuorg, aldot@gcc.gnu.org, repdotnopgmailcom, rep.dot.nop@gmail.com X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yw0-f195.google.com Received: from mail-yw0-f195.google.com (HELO mail-yw0-f195.google.com) (209.85.161.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 19 Jun 2016 09:18:11 +0000 Received: by mail-yw0-f195.google.com with SMTP id d137so7206852ywe.0; Sun, 19 Jun 2016 02:18:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=X1AJY50mvsN3f/04GMJwskx6f7wEVyybSkP1ZpikMlc=; b=chGN1G5zuEathlVWm6I99IhxujJMuE9Fs0gkpiHPBjG4xNYQsnNhWH4TAZkhG1i/tU nUYaLSEmpPRwopopxpWu2pz2mFEzbIQlFpEGbbulEB4c7Y69IIuDbchSsEvfgoG+LHs4 OpvoF7ELzPGAm31vK3jHM6E6ErBhyUiCGDkENmXrxXZLmdTZEK9y9Ujol6UdqSsTl6Jj vVjoyujq1DDbdTR4r7kYo6lpkje3f9prCwvUdSQkj3wTSjTAoiPG02bBs/MOWlEAtBvn qZWmxLi8mxVyd+XpPA8g7HfrpiVosnRXx9u0frqDYBCyKvZ7Ft7/qjrD/VmXZfpV62hR KiHQ== X-Gm-Message-State: ALyK8tKpt6sAIKXeW2cMSjVmY9ysfW4Lmx/hpjukcP/eBjw4s7OzztYpty7K1MvOp1a280hEOK0xzaaWXB+/Nw== X-Received: by 10.37.214.65 with SMTP id n62mr5461629ybg.79.1466327888905; Sun, 19 Jun 2016 02:18:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.154.18 with HTTP; Sun, 19 Jun 2016 02:18:08 -0700 (PDT) In-Reply-To: References: <1448974501-30981-1-git-send-email-rep.dot.nop@gmail.com> From: Paul Richard Thomas Date: Sun, 19 Jun 2016 09:18:00 -0000 Message-ID: Subject: Re: [PATCH] Use gfc_add_*_component defines where appropriate To: Bernhard Reutner-Fischer Cc: "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00052.txt.bz2 Hi Bernhard, Thanks for doing some of this tidying up. The patch is OK to commit on both trunk and 6-branch. It might be worth going back to 5-branch as well, if you feel up to it. Cheers Paul On 18 June 2016 at 21:47, Bernhard Reutner-Fischer wrote: > Ping. > > On December 1, 2015 1:54:58 PM GMT+01:00, Bernhard Reutner-Fischer wrote: >>A couple of places used gfc_add_component_ref(expr, "string") instead >>of >>the defines from gfortran.h >> >>Regstrapped without regressions, ok for trunk stage3 now / next stage1? >> >>gcc/fortran/ChangeLog >> >>2015-11-29 Bernhard Reutner-Fischer >> >> * class.c (gfc_add_class_array_ref): Call gfc_add_data_component() >> instead of gfc_add_component_ref(). >> (gfc_get_len_component): Call gfc_add_len_component() instead of >> gfc_add_component_ref(). >> * trans-intrinsic.c (gfc_conv_intrinsic_loc): Call >> gfc_add_data_component() instead of gfc_add_component_ref(). >> * trans.c (gfc_add_finalizer_call): Call >> gfc_add_final_component() and gfc_add_size_component() instead >> of gfc_add_component_ref. >> >>Signed-off-by: Bernhard Reutner-Fischer >>--- >> gcc/fortran/class.c | 4 ++-- >> gcc/fortran/trans-intrinsic.c | 2 +- >> gcc/fortran/trans.c | 4 ++-- >> 3 files changed, 5 insertions(+), 5 deletions(-) >> >>diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c >>index 8b49ae9..027cb89 100644 >>--- a/gcc/fortran/class.c >>+++ b/gcc/fortran/class.c >>@@ -258,7 +258,7 @@ gfc_add_class_array_ref (gfc_expr *e) >> int rank = CLASS_DATA (e)->as->rank; >> gfc_array_spec *as = CLASS_DATA (e)->as; >> gfc_ref *ref = NULL; >>- gfc_add_component_ref (e, "_data"); >>+ gfc_add_data_component (e); >> e->rank = rank; >> for (ref = e->ref; ref; ref = ref->next) >> if (!ref->next) >>@@ -584,7 +584,7 @@ gfc_get_len_component (gfc_expr *e) >> ref = ref->next; >> } >> /* And replace if with a ref to the _len component. */ >>- gfc_add_component_ref (ptr, "_len"); >>+ gfc_add_len_component (ptr); >> return ptr; >> } >> >>diff --git a/gcc/fortran/trans-intrinsic.c >>b/gcc/fortran/trans-intrinsic.c >>index 1dabc26..2ef0709 100644 >>--- a/gcc/fortran/trans-intrinsic.c >>+++ b/gcc/fortran/trans-intrinsic.c >>@@ -7112,7 +7112,7 @@ gfc_conv_intrinsic_loc (gfc_se * se, gfc_expr * >>expr) >> if (arg_expr->rank == 0) >> { >> if (arg_expr->ts.type == BT_CLASS) >>- gfc_add_component_ref (arg_expr, "_data"); >>+ gfc_add_data_component (arg_expr); >> gfc_conv_expr_reference (se, arg_expr); >> } >> else >>diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c >>index 2a91c35..14dad0f 100644 >>--- a/gcc/fortran/trans.c >>+++ b/gcc/fortran/trans.c >>@@ -1132,11 +1132,11 @@ gfc_add_finalizer_call (stmtblock_t *block, >>gfc_expr *expr2) >> >> final_expr = gfc_copy_expr (expr); >> gfc_add_vptr_component (final_expr); >>- gfc_add_component_ref (final_expr, "_final"); >>+ gfc_add_final_component (final_expr); >> >> elem_size = gfc_copy_expr (expr); >> gfc_add_vptr_component (elem_size); >>- gfc_add_component_ref (elem_size, "_size"); >>+ gfc_add_size_component (elem_size); >> } >> >> gcc_assert (final_expr->expr_type == EXPR_VARIABLE); > > -- The difference between genius and stupidity is; genius has its limits. Albert Einstein