mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/47056 (10 Ada ACATS tests fail to link with undefined reference on ia64-linux)
PR tree-optimization/47056 * cgraphbuild.c (mark_address): Remove ATTRIBUTE_UNUSED markers. (mark_load): Likewise. Handle FUNCTION_DECL specially. (mark_store): Likewise. Pass STMT to ipa_record_reference. From-SVN: r168493
This commit is contained in:
parent
c5a62c6fde
commit
3ebb5ca6cc
|
|
@ -1,3 +1,10 @@
|
||||||
|
2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
PR tree-optimization/47056
|
||||||
|
* cgraphbuild.c (mark_address): Remove ATTRIBUTE_UNUSED markers.
|
||||||
|
(mark_load): Likewise. Handle FUNCTION_DECL specially.
|
||||||
|
(mark_store): Likewise. Pass STMT to ipa_record_reference.
|
||||||
|
|
||||||
2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
|
2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* dwarf2out.c (rtl_for_decl_init): Strip no-op conversions off the
|
* dwarf2out.c (rtl_for_decl_init): Strip no-op conversions off the
|
||||||
|
|
|
||||||
|
|
@ -234,8 +234,7 @@ compute_call_stmt_bb_frequency (tree decl, basic_block bb)
|
||||||
/* Mark address taken in STMT. */
|
/* Mark address taken in STMT. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
mark_address (gimple stmt ATTRIBUTE_UNUSED, tree addr,
|
mark_address (gimple stmt, tree addr, void *data)
|
||||||
void *data ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
addr = get_base_address (addr);
|
addr = get_base_address (addr);
|
||||||
if (TREE_CODE (addr) == FUNCTION_DECL)
|
if (TREE_CODE (addr) == FUNCTION_DECL)
|
||||||
|
|
@ -268,11 +267,20 @@ mark_address (gimple stmt ATTRIBUTE_UNUSED, tree addr,
|
||||||
/* Mark load of T. */
|
/* Mark load of T. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
mark_load (gimple stmt ATTRIBUTE_UNUSED, tree t,
|
mark_load (gimple stmt, tree t, void *data)
|
||||||
void *data ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
t = get_base_address (t);
|
t = get_base_address (t);
|
||||||
if (t && TREE_CODE (t) == VAR_DECL
|
if (t && TREE_CODE (t) == FUNCTION_DECL)
|
||||||
|
{
|
||||||
|
/* ??? This can happen on platforms with descriptors when these are
|
||||||
|
directly manipulated in the code. Pretend that it's an address. */
|
||||||
|
struct cgraph_node *node = cgraph_node (t);
|
||||||
|
cgraph_mark_address_taken_node (node);
|
||||||
|
ipa_record_reference ((struct cgraph_node *)data, NULL,
|
||||||
|
node, NULL,
|
||||||
|
IPA_REF_ADDR, stmt);
|
||||||
|
}
|
||||||
|
else if (t && TREE_CODE (t) == VAR_DECL
|
||||||
&& (TREE_STATIC (t) || DECL_EXTERNAL (t)))
|
&& (TREE_STATIC (t) || DECL_EXTERNAL (t)))
|
||||||
{
|
{
|
||||||
struct varpool_node *vnode = varpool_node (t);
|
struct varpool_node *vnode = varpool_node (t);
|
||||||
|
|
@ -293,8 +301,7 @@ mark_load (gimple stmt ATTRIBUTE_UNUSED, tree t,
|
||||||
/* Mark store of T. */
|
/* Mark store of T. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
mark_store (gimple stmt ATTRIBUTE_UNUSED, tree t,
|
mark_store (gimple stmt, tree t, void *data)
|
||||||
void *data ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
t = get_base_address (t);
|
t = get_base_address (t);
|
||||||
if (t && TREE_CODE (t) == VAR_DECL
|
if (t && TREE_CODE (t) == VAR_DECL
|
||||||
|
|
@ -310,7 +317,7 @@ mark_store (gimple stmt ATTRIBUTE_UNUSED, tree t,
|
||||||
vnode = vnode->extra_name;
|
vnode = vnode->extra_name;
|
||||||
ipa_record_reference ((struct cgraph_node *)data, NULL,
|
ipa_record_reference ((struct cgraph_node *)data, NULL,
|
||||||
NULL, vnode,
|
NULL, vnode,
|
||||||
IPA_REF_STORE, NULL);
|
IPA_REF_STORE, stmt);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue