From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10199 invoked by alias); 5 Apr 2011 12:11:04 -0000 Received: (qmail 10188 invoked by uid 22791); 5 Apr 2011 12:11:02 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Apr 2011 12:10:25 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 196F78765C for ; Tue, 5 Apr 2011 14:10:24 +0200 (CEST) Date: Tue, 05 Apr 2011 12:11:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR48431 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00322.txt.bz2 Committed. Richard. 2011-04-05 Richard Guenther PR bootstrap/48431 * lto-plugin.c (claim_file_handler): Do not declare vars in code. Index: lto-plugin/lto-plugin.c =================================================================== *** lto-plugin/lto-plugin.c (revision 171978) --- lto-plugin/lto-plugin.c (working copy) *************** claim_file_handler (const struct ld_plug *** 851,861 **** /* We pass the offset of the actual file, not the archive header. Can't use PRIx64, because that's C99, so we have to print the 64-bit hex int as two 32-bit ones. */ ! int lo, hi; lo = file->offset & 0xffffffff; hi = ((int64_t)file->offset >> 32) & 0xffffffff; ! int t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi) ! : asprintf (&objname, "%s@0x%x", file->name, lo); check (t >= 0, LDPL_FATAL, "asprintf failed"); lto_file.name = objname; } --- 851,861 ---- /* We pass the offset of the actual file, not the archive header. Can't use PRIx64, because that's C99, so we have to print the 64-bit hex int as two 32-bit ones. */ ! int lo, hi, t; lo = file->offset & 0xffffffff; hi = ((int64_t)file->offset >> 32) & 0xffffffff; ! t = hi ? asprintf (&objname, "%s@0x%x%08x", file->name, lo, hi) ! : asprintf (&objname, "%s@0x%x", file->name, lo); check (t >= 0, LDPL_FATAL, "asprintf failed"); lto_file.name = objname; }