From patchwork Fri Mar 23 15:44:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renlin Li X-Patchwork-Id: 890031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-475372-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dBx2cqZa"; dkim-atps=neutral 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 4077C01rVVz9s0R for ; Sat, 24 Mar 2018 02:44:43 +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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=u/aI/827D/qWLQI4ywvfSvlqRosQBHcjseF0DsxIGBOxwohE4O i9XST4fsRMtZGuAGI6yycKLLT7/k61YsTSZqac40jPh8m9tj1iXSEIKr5fsqYLJO 4HowzZlm3Nr3jsH82hphhaeRu14p/+rBKan5Lsg2psjDVpCpTaWLkiQaU= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=WWpBlqPoiyd7HdqcO9UY3Pr/uWQ=; b=dBx2cqZadcOWMlL34OlU AU+5jurdy9SEStRSs7sQfOwg6tE/1Xh8EiJnUMldAjAyEhu7mLOHOgcsnrQiPoPV m9L76n/TKPXhMeDyRsQe0VsW8RWGGMLWgDcSc5O2xMuVShboKp9S2YwoeSz6AIBx 5RPlioik6t5rGwvMn9IlJ7k= Received: (qmail 84858 invoked by alias); 23 Mar 2018 15:44: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 84844 invoked by uid 89); 23 Mar 2018 15:44:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1139 X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Mar 2018 15:44:34 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A8C8A1435 for ; Fri, 23 Mar 2018 08:44:32 -0700 (PDT) Received: from [10.2.206.38] (e109742-lin.cambridge.arm.com [10.2.206.38]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 506873F487 for ; Fri, 23 Mar 2018 08:44:32 -0700 (PDT) To: "gcc-patches@gcc.gnu.org" From: Renlin Li Subject: [PATCH]Correct comment for ADDR_EXPR tree code. Message-ID: <217ce49a-cc7e-c142-6ae5-d580c486d771@foss.arm.com> Date: Fri, 23 Mar 2018 15:44:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi all, This is a simple patch to correct the comment for ADDR_EXPR tree code. The resulting expression of ADDR_EXPR is a tree with POINTER_TYPE. So the result mode should ptr_mode instead of Pmode. As far as I understand, Pmode is the addressing mode. But not the mode to represent a pointer (or address?). Okay to commit? Regards, Renlin gcc/ChangeLog: 2018-03-23 Renlin Li * tree.def (ADDR_EXPR): Correct the commnet. diff --git a/gcc/tree.def b/gcc/tree.def index 31de6c0994de43c175b924d4ba578a131fb4d524..1e5aca811f801c54be9215a9d86028f50a4ec608 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -870,7 +870,7 @@ DEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", tcc_expression, 1) DEFTREECODE (SAVE_EXPR, "save_expr", tcc_expression, 1) /* & in C. Value is the address at which the operand's value resides. - Operand may have any mode. Result mode is Pmode. */ + Operand may have any mode. Result mode is ptr_mode. */ DEFTREECODE (ADDR_EXPR, "addr_expr", tcc_expression, 1) /* Operand0 is a function constant; result is part N of a function