From patchwork Fri Mar 20 13:51:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Vehreschild X-Patchwork-Id: 452647 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 26C4E14016B for ; Sat, 21 Mar 2015 01:07:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=OWuUjy97; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=VLbY2EwM6NuAB19z+3eJ9QVh/+9BNrFNxWvQnkPau+Gjoo63vnuOZ C6BXBxIBHLV3s/bHgypEyBFe2bN91u7lHrG7czkewrsk7e3qCAeXEZJweBWnmJSF XKmKlufJ5VmDkr2JDtt0Y6MNWH+N8Vsmhf+tlqgfXU/F8EMZdO2ZGY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=qxsL0nY76z8BmGEXBa4yMClW84s=; b=OWuUjy97y0VoGkCrNbk9 dRL/+E0iqJuh2D2KLwNymMLPYvBlDQOq8IOeKDCnZ43ibQ+GK0iYSC2F+z9EfsAc b9q7ykqWi6imDvkQaHCDjJGMEbwLWFHu1kv4BmKvJI4mvPoEEmwnSYRDS5wymRyc FZgu4WRatJn4jkrEKLI+1Ps= Received: (qmail 103889 invoked by alias); 20 Mar 2015 13:55:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 103825 invoked by uid 89); 20 Mar 2015 13:55:35 -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 autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Mar 2015 13:51:42 +0000 Received: from vepi2 ([88.75.104.20]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MIzGn-1YX2Rv1wbp-002Yfa; Fri, 20 Mar 2015 14:51:06 +0100 Date: Fri, 20 Mar 2015 14:51:04 +0100 From: Andre Vehreschild To: GCC-Patches-ML , GCC-Fortran-ML Subject: [Patch, Fortran, v1] Cosmetics and code simplify Message-ID: <20150320145104.4cdea6b8@vepi2> MIME-Version: 1.0 X-UI-Out-Filterresults: notjunk:1; Hi all, during checking that pr 61275 is really fixed, I found a indentation issue and a piece of my former code, that could be done nicer and more readable. This patch addresses both these issues. Bootstraps and regtests ok on x86_64-linux-gnu/F20. Ok for trunk? Regards, Andre diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index a30c391..f6fe9a1 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -7111,7 +7111,7 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init) of EXPR_NULL,... by default, the static nullify is not needed since this is done every time we come into scope. */ if (!c->expr || (cm->attr.allocatable && cm->attr.flavor != FL_PROCEDURE)) - continue; + continue; if (cm->initializer && cm->initializer->expr_type != EXPR_NULL && strcmp (cm->name, "_extends") == 0 @@ -7132,13 +7132,9 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init) val)); } else if (cm->ts.type == BT_INTEGER && strcmp (cm->name, "_len") == 0) - { - gfc_expr *e = gfc_get_int_expr (gfc_default_integer_kind, NULL, 0); - val = gfc_conv_constant_to_tree (e); - CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, - fold_convert (TREE_TYPE (cm->backend_decl), - val)); - } + CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, + fold_convert (TREE_TYPE (cm->backend_decl), + integer_zero_node)); else { val = gfc_conv_initializer (c->expr, &cm->ts,