From patchwork Thu Oct 12 00:03:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edelsohn X-Patchwork-Id: 824612 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-463992-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="K3lGjuqC"; 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 3yCB006qbyz9t16 for ; Thu, 12 Oct 2017 11:03:41 +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 :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=G1sCpndciaJCuBf/iIZ6zMoWmQ5sSwgDVo0EXqeBjcumL/ S7sOn2yLVOHBPZOgp4xGelBlcRuZKFgT3nEQGBn2k3dzQSDmX4xYGGwhqszEAf6l uc1BO8cRqVo1xSnMBURguuKLuqT5W00AOJwp4Wj3exYBqlxvSH17i+lCSgT14= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=BpcpzooSXdDFb1YuV7aaETh5rTg=; b=K3lGjuqC4gPUlt0g7XHi XS7cfxJrgcM6HoPbeOLDdrVuX2IdgvjdXcJV6nw9pmxLCpgKkeLH8V9czmyqt2GE VPTAlv18835rADVIvtu/JrDz2xSRxUH7W4F7HqxJCfNSZillmkmqVXFL0L39i6PE o3aK95Ki5lAzPCvZF03/o3Q= Received: (qmail 79735 invoked by alias); 12 Oct 2017 00:03:33 -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 79721 invoked by uid 89); 12 Oct 2017 00:03:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:852 X-HELO: mail-qt0-f171.google.com Received: from mail-qt0-f171.google.com (HELO mail-qt0-f171.google.com) (209.85.216.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Oct 2017 00:03:31 +0000 Received: by mail-qt0-f171.google.com with SMTP id q4so10401890qtq.8 for ; Wed, 11 Oct 2017 17:03:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=oLsdKz18gR9ejYAFeRQUTNDIdmUZ0riNORygpiEqinc=; b=TpfIgn5thzA7k+7a+rLZtSHfMkBJaeFnyTSqsHkMdf6aA/5dS+I488Ek37gMTK5OLs XHE2i1BcLtdvI5vIQHXbAyEzvEO2E0rWtnwRpSBwuREG3KGGrnSlu9Cc3e1q71FEdAf4 VZpRW4zM7irHMOoLWpxbUeU21BMytcEksA+APqTlgwJ6N4YHbgpmzgvFuBwJ/ntGIat0 zaqd6G6Ru1KTkZP5Ae4hot1KRrXCyvxlhgEHvFCf4fyxQk746IJXgL9Y+ND/kfsh2jLY 05XfGFH9lTmO6P5LwujjYw/3+J3Hkr3vc0VRRbEGsOqBjwYe3yZ+C1j5VsNT4CXd5cwd d5Sg== X-Gm-Message-State: AMCzsaUGtkhqvmRW4q/OMLsg0lSSoc0ve/XVxj9/U9ktpT7wcDIlz1/9 Hfl1JOMQS6C+9hSd+YrCBDyJOVBR42eh00AZKWxvaQ== X-Google-Smtp-Source: AOwi7QAjPi+8/ms2BhBkEAB8phb33Tdop1Eu9tY3TfyAnolHnRq5xt9g7c9uR/IdWDduToWB5uhWisgIZeOlcB3/mJc= X-Received: by 10.200.35.21 with SMTP id a21mr1110017qta.215.1507766609990; Wed, 11 Oct 2017 17:03:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.130.165 with HTTP; Wed, 11 Oct 2017 17:03:29 -0700 (PDT) From: David Edelsohn Date: Wed, 11 Oct 2017 20:03:29 -0400 Message-ID: Subject: [PATCH,AIX] rs6000 output_aligned_decl_common fix To: GCC Patches GCC toplev.c uses ASM_OUTPUT_ALIGNED_DECL_COMMON with a NULL decl to emit the LTO marker, so the rs6000 implementation needs to test for that situation. config/darwin.c tests similarly. With this patch, gcc -flto produces correct output on AIX. Bootstrapped on powerpc-ibm-aix7.2.0.0 Thanks, David * config/rs6000/rs6000.c (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl. Index: rs6000.c =================================================================== --- rs6000.c (revision 253666) +++ rs6000.c (working copy) @@ -34375,7 +34375,8 @@ rs6000_xcoff_asm_output_aligned_decl_common (FILE size, align2); #ifdef HAVE_GAS_HIDDEN - fputs (rs6000_xcoff_visibility (decl), stream); + if (decl != NULL) + fputs (rs6000_xcoff_visibility (decl), stream); #endif putc ('\n', stream); }