From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6386 invoked by alias); 26 Apr 2012 21:14:05 -0000 Received: (qmail 6377 invoked by uid 22791); 26 Apr 2012 21:14:05 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Apr 2012 21:13:52 +0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/53093] [4.8 Regression]: tls/alias-1.c ICE, emutls Date: Thu, 26 Apr 2012 21:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-04/txt/msg02379.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53093 --- Comment #4 from Jan Hubicka 2012-04-26 21:13:35 UTC --- Created attachment 27250 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27250 proposed fix. Thank you. I actually found why the numbers does not match. I was wrong with my previous analysis - the aliases are counted in first loop. The issue is that when handling aliases the code is creating new aliases as it walks the tree. It depends on luck whether the walk will pick the new alias or not. Can you, please try once again the attached patch? It should restore the original behavior. I am not sure that the code makes sense: I would expect TLS var of alias to be alias of the TLS var of the target. The code however creates alias of the target instead. I can't think of explanation how that would make sense. Does the aliases behave sanely with emutls? Honza