re PR ada/62019 (gnat.dg/weak2.adb fails everywhere)
PR ada/62019 * tree-eh.c (tree_could_trap) <FUNCTION_DECL>: Revamp and really do not choke on null node. <VAR_DECL>: Likewise. From-SVN: r216223
This commit is contained in:
parent
9edc6e4cf9
commit
5940e204bd
2 changed files with 17 additions and 16 deletions
|
@ -1,3 +1,10 @@
|
|||
2014-10-14 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR ada/62019
|
||||
* tree-eh.c (tree_could_trap) <FUNCTION_DECL>: Revamp and really
|
||||
do not choke on null node.
|
||||
<VAR_DECL>: Likewise.
|
||||
|
||||
2014-10-14 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* machmode.h (int_n_data_t): New.
|
||||
|
|
|
@ -2657,15 +2657,12 @@ tree_could_trap_p (tree expr)
|
|||
/* Assume that accesses to weak functions may trap, unless we know
|
||||
they are certainly defined in current TU or in some other
|
||||
LTO partition. */
|
||||
if (DECL_WEAK (expr) && !DECL_COMDAT (expr))
|
||||
if (DECL_WEAK (expr) && !DECL_COMDAT (expr) && DECL_EXTERNAL (expr))
|
||||
{
|
||||
struct cgraph_node *node;
|
||||
if (!DECL_EXTERNAL (expr))
|
||||
return false;
|
||||
node = cgraph_node::get (expr)->function_symbol ();
|
||||
if (node && node->in_other_partition)
|
||||
return false;
|
||||
return true;
|
||||
cgraph_node *node = cgraph_node::get (expr);
|
||||
if (node)
|
||||
node = node->function_symbol ();
|
||||
return !(node && node->in_other_partition);
|
||||
}
|
||||
return false;
|
||||
|
||||
|
@ -2673,15 +2670,12 @@ tree_could_trap_p (tree expr)
|
|||
/* Assume that accesses to weak vars may trap, unless we know
|
||||
they are certainly defined in current TU or in some other
|
||||
LTO partition. */
|
||||
if (DECL_WEAK (expr) && !DECL_COMDAT (expr))
|
||||
if (DECL_WEAK (expr) && !DECL_COMDAT (expr) && DECL_EXTERNAL (expr))
|
||||
{
|
||||
varpool_node *node;
|
||||
if (!DECL_EXTERNAL (expr))
|
||||
return false;
|
||||
node = varpool_node::get (expr)->ultimate_alias_target ();
|
||||
if (node && node->in_other_partition)
|
||||
return false;
|
||||
return true;
|
||||
varpool_node *node = varpool_node::get (expr);
|
||||
if (node)
|
||||
node = node->ultimate_alias_target ();
|
||||
return !(node && node->in_other_partition);
|
||||
}
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue