From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123590 invoked by alias); 18 May 2015 07:35:58 -0000 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 Received: (qmail 123514 invoked by uid 89); 18 May 2015 07:35:57 -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_50,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 18 May 2015 07:35:55 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CFC73ABB3; Mon, 18 May 2015 07:35:51 +0000 (UTC) Date: Mon, 18 May 2015 08:00:00 -0000 From: Richard Biener To: Jeff Law cc: Dharmakan Rohit Arul Raj , "gcc-patches@gcc.gnu.org" , Jakub Jelinek , Alan Modra , David Edelsohn , Edmar Wienskoski Subject: Re: [RFC: Patch, PR 60158] gcc/varasm.c : Pass actual alignment value to output_constant_pool_2 In-Reply-To: <55562E64.2040009@redhat.com> Message-ID: References: <553FCEC6.8030609@redhat.com> <55400A0E.5010601@redhat.com> <554243E9.6030206@redhat.com> <55424DC9.5020303@redhat.com> <55557D4C.9010500@redhat.com> <55562E64.2040009@redhat.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1609908220-351641069-1431934551=:18702" X-SW-Source: 2015-05/txt/msg01535.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1609908220-351641069-1431934551=:18702 Content-Type: TEXT/PLAIN; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-length: 2241 On Fri, 15 May 2015, Jeff Law wrote: > On 05/15/2015 04:37 AM, Dharmakan Rohit Arul Raj wrote: > > > > > -----Original Message----- > > > From: Jeff Law [mailto:law@redhat.com] > > > Sent: Friday, May 15, 2015 10:30 AM > > > > Just to summarize: By default in GCC v4.7.x, all the constants are put > > > > into '.rodata.str1.4' section. In GCC v4.8.x from r192719 onwards, one > > > > of the move instruction of the string constant ".LC0" is getting > > > > spilled. The reload pass, for any constants that aren't allowed and > > > > can't be reloaded in to registers tries to change them into memory > > > > references. Then while emitting that string constant to asm code > > > > (A:varasm.c: output_constant_pool_1), it explicitly passes the > > > > alignment as 1 which prevents the generation of fix-up table entries > > > > in 'B: rs6000.c:rs6000_assemble_integer' because the data is > > > > considered unaligned now. > > > > > > > > The bug seems to have gone latent with an unrelated trunk commit > > > > r204695 [* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Refactor > > > > the code. Handle type conversion.]. This commit chooses different > > > > spill candidates hence all the string constants are being put in to > > > > '.rodata.str1.4´section. > > > > > > > > The check I had in the test case is that if there is a > > > > '.data.rel.ro.local', then there should be '.fixup' section generated. > > > > > > > > Please let me know if you need any other details. > > > Thanks. Even though I wasn't able to trigger the bug with the testcase > > > from > > > 65018, I went ahead and committed this patch to the trunk. It can't hurt > > > and > > > it's the right thing to do. > > > > > > Thanks for your patience, > > > > > > > Jeff, Thanks for checking-in the changes. > > Can we apply the patch to GCC v4.8 and GCC v4.9 branch as well? > That's up to the branch maintainers. I'd think it's safe, but it's ultimately > their call. If it's a regression or a wrong-code issue then it's ok to backport given the patch is safe, of course. Richard. > jeff > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nuernberg) ---1609908220-351641069-1431934551=:18702--