From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46865 invoked by alias); 3 Mar 2015 19:12:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 46780 invoked by uid 48); 3 Mar 2015 19:12:48 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/61886] [4.8/4.9/5 Regression] LTO breaks fread with _FORTIFY_SOURCE=2 Date: Tue, 03 Mar 2015 19:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: diagnostic, lto, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00380.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886 --- Comment #35 from Jan Hubicka --- Zack, happy to hear from you again! Indeed the problem back was quite sloppy and we kind of mixed up symbols, assembler names and declarations in not well defined way. I think the safest way to go is to build on the alias machinery. For weakref we already have sense of "syntactic alias" (those that ends up translated to their target symbols) and I did some auditing recently (motivated by ICF bugs). Currently we have node->weakref saying if symbol is weakref and we do have good part of code aware of this. I guess we can have node->syntactic_alias (better name welcome, perhaps transparent?) that express the fact that alias should get translated to the final symbol during RTL output the same way as we do weakref on targets where they are not supported. Then it is a question where we want to translate the duplicated declarations into these aliases. I guess I can do it within the visibility itself or the FEs can be responsible for it. We can also get more fancy and try to solve the GNU extern inline issues - have a syntactic alias with also has boddy associated with it. I will try to start pushing things this direction.