From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8900 invoked by alias); 11 Apr 2014 09:25:58 -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 8859 invoked by uid 48); 11 Apr 2014 09:25:55 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60797] [4.9 Regression] gcc hangs with error: only weak aliases are supported in this configuration Date: Fri, 11 Apr 2014 09:25: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-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 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: 2014-04/txt/msg00798.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60797 --- Comment #2 from Richard Biener --- 0x0000000000615b12 in c_write_global_declarations_1 ( globals=) at /space/rguenther/src/svn/trunk/gcc/c/c-decl.c:10276 10272 do 10273 { 10274 reconsider = false; 10275 for (decl = globals; decl; decl = DECL_CHAIN (decl)) 10276 reconsider |= wrapup_global_declaration_2 (decl); 10277 } 10278 while (reconsider); which basically endlessly loops because nothing sets TREE_ASM_WRITTEN on the alias. Index: gcc/varasm.c =================================================================== --- gcc/varasm.c (revision 209292) +++ gcc/varasm.c (working copy) @@ -5675,6 +5675,7 @@ assemble_alias (tree decl, tree target) else error_at (DECL_SOURCE_LOCATION (decl), "only weak aliases are supported in this configuration"); + TREE_ASM_WRITTEN (decl) = 1; return; } # endif fixes it. Probably also needed above for targets without any alias support. I wonder why "weakref" errors just fall through and don't return though. Index: gcc/varasm.c =================================================================== --- gcc/varasm.c (revision 209292) +++ gcc/varasm.c (working copy) @@ -5665,6 +5665,7 @@ assemble_alias (tree decl, tree target) # if !defined(ASM_OUTPUT_WEAK_ALIAS) && !defined (ASM_WEAKEN_DECL) error_at (DECL_SOURCE_LOCATION (decl), "alias definitions not supported in this configuration"); + TREE_ASM_WRITTEN (decl) = 1; return; # else if (!DECL_WEAK (decl)) @@ -5675,6 +5676,7 @@ assemble_alias (tree decl, tree target) else error_at (DECL_SOURCE_LOCATION (decl), "only weak aliases are supported in this configuration"); + TREE_ASM_WRITTEN (decl) = 1; return; } # endif