http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60797
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- 0x0000000000615b12 in c_write_global_declarations_1 ( globals=<type_decl 0x7ffff6c4d170 int>) 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