From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1033) id 203F23857827; Wed, 15 Sep 2021 21:15:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 203F23857827 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: David Edelsohn To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-3558] rs6000: fix xcoff section encoding X-Act-Checkin: gcc X-Git-Author: David Edelsohn X-Git-Refname: refs/heads/master X-Git-Oldrev: 30e025393209e1936c394e716006cdaaa6d50161 X-Git-Newrev: f5ae6447bd8a551689021e8884726f1d0d077ec2 Message-Id: <20210915211505.203F23857827@sourceware.org> Date: Wed, 15 Sep 2021 21:15:05 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 21:15:05 -0000 https://gcc.gnu.org/g:f5ae6447bd8a551689021e8884726f1d0d077ec2 commit r12-3558-gf5ae6447bd8a551689021e8884726f1d0d077ec2 Author: David Edelsohn Date: Wed Sep 15 17:10:35 2021 -0400 rs6000: fix xcoff section encoding The encoding needs to be applied if the decl is not an alias: both a NULL summary *OR* the decl alias flag is false. This patch updates the earlier fix to continue with the encoding selection if the summary is NULL. gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_xcoff_encode_section_info): Proceed if no symbol summary or the symbol alias flag is false. Diff: --- gcc/config/rs6000/rs6000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d0830a95027..ad81dfb316d 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -21728,8 +21728,8 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first) if (decl && DECL_P (decl) && VAR_OR_FUNCTION_DECL_P (decl) - && symtab_node::get (decl) != NULL - && symtab_node::get (decl)->alias == 0 + && (symtab_node::get (decl) == NULL + || symtab_node::get (decl)->alias == 0) && symname[strlen (symname) - 1] != ']') { const char *smclass = NULL;