From patchwork Sun Dec 28 14:04:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Vehreschild X-Patchwork-Id: 424318 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 900E71400D2 for ; Mon, 29 Dec 2014 01:04:58 +1100 (AEDT) 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=vMkVIpJDlbztjcDTVcGAaa8N2hP5bbw5elCcN5topAUgP/efZy7y0 jsluGvVhs/kA43KfEfEZPLIqiWdtzoELePFlX8+5hetzpz5a4bJ7Nfs+fLYnhotS bAdXn9vlRioqKPNbTBpbNxbl9EpCdveJUQiP281mGX+24qXrS9H1R8= 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=EWxI8MQRbpLelCzAmGBJPo4HZhM=; b=cbSIcK+hFW9mTLV+Y5Hi KQyEnv+dgxd242B7MmsMbqdBIJJnNyFrBDT5/MAg9SpChzgSH+EyuLkOddyKSFWL vF6mOGBBVlyCITI0Q680JvMVlNOWqStLAbD0Jpbi2iS88qsi0GlyKXmspDDt+xNy TyPch0eupfAKboSXGLdUrrA= Received: (qmail 28911 invoked by alias); 28 Dec 2014 14:04:47 -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 28889 invoked by uid 89); 28 Dec 2014 14:04:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS 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.22) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 28 Dec 2014 14:04:43 +0000 Received: from localhost ([84.63.49.248]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MFi1J-1Y2Flq3biH-00EekH; Sun, 28 Dec 2014 15:04:39 +0100 Date: Sun, 28 Dec 2014 15:04:39 +0100 From: Andre Vehreschild To: GCC-Fortran-ML , GCC-Patches-ML Subject: [Fortran, Patch] Cosmetics Message-ID: <20141228150439.0af8d95d@gmx.de> MIME-Version: 1.0 X-UI-Out-Filterresults: notjunk:1; Hi all, during gfortran hacking I found a displaced comment and an indentation mistake. Just to make sure those don't get mangled in my other patches, I submit them here. - Andre gcc/fortran/ChangeLog: 2014-12-28 Andre Vehreschild * trans-decl.c (gfc_finish_var_decl): Fixed displaced comment. * trans-stmt.c (gfc_trans_allocate): Fixed indentation. diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 494d8aa..04568c8 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -550,17 +550,18 @@ static void gfc_finish_var_decl (tree decl, gfc_symbol * sym) { tree new_type; - /* TREE_ADDRESSABLE means the address of this variable is actually needed. - This is the equivalent of the TARGET variables. - We also need to set this if the variable is passed by reference in a - CALL statement. */ /* Set DECL_VALUE_EXPR for Cray Pointees. */ if (sym->attr.cray_pointee) gfc_finish_cray_pointee (decl, sym); + /* TREE_ADDRESSABLE means the address of this variable is actually needed. + This is the equivalent of the TARGET variables. + We also need to set this if the variable is passed by reference in a + CALL statement. */ if (sym->attr.target) TREE_ADDRESSABLE (decl) = 1; + /* If it wasn't used we wouldn't be getting it. */ TREE_USED (decl) = 1; diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 47edd32..24e47f2 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -5055,7 +5055,7 @@ gfc_trans_allocate (gfc_code * code) if (unlimited_char) tmp = TREE_TYPE (gfc_typenode_for_spec (&code->expr3->ts)); else - tmp = TREE_TYPE (gfc_typenode_for_spec (&al->expr->ts)); + tmp = TREE_TYPE (gfc_typenode_for_spec (&al->expr->ts)); tmp = TYPE_SIZE_UNIT (tmp); memsz = fold_build2_loc (input_location, MULT_EXPR, TREE_TYPE (tmp), tmp,