2011-12-06 Richard Guenther <rguenther@suse.de>
+ PR middle-end/50601
+ * varasm.c (assemble_alias): Move DECL_EXTERNAL implementation
+ quirk adjustjment ...
+ * passes.c (rest_of_decl_compilation): ... here.
+
+2011-12-06 Richard Guenther <rguenther@suse.de>
+
PR middle-end/51436
* gimple-fold.c (gimplify_and_update_call_from_tree): Guard
vdef check for the fact we do not have virtual operands when
{
alias = TREE_VALUE (TREE_VALUE (alias));
alias = get_identifier (TREE_STRING_POINTER (alias));
+ /* A quirk of the initial implementation of aliases required that the
+ user add "extern" to all of them. Which is silly, but now
+ historical. Do note that the symbol is in fact locally defined. */
+ if (!lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)))
+ DECL_EXTERNAL (decl) = 0;
assemble_alias (decl, alias);
}
}
assemble_alias (tree decl, tree target)
{
tree target_decl;
- bool is_weakref = false;
if (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)))
{
tree alias = DECL_ASSEMBLER_NAME (decl);
- is_weakref = true;
-
ultimate_transparent_alias_target (&target);
if (alias == target)
}
TREE_USED (decl) = 1;
- /* A quirk of the initial implementation of aliases required that the user
- add "extern" to all of them. Which is silly, but now historical. Do
- note that the symbol is in fact locally defined. */
- if (! is_weakref)
- DECL_EXTERNAL (decl) = 0;
-
/* Allow aliases to aliases. */
if (TREE_CODE (decl) == FUNCTION_DECL)
cgraph_get_create_node (decl)->alias = true;