summaryrefslogtreecommitdiff
path: root/gcc/tree-eh.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r--gcc/tree-eh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index fc350bd945f..fb80b30a44c 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2580,7 +2580,7 @@ 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))
+ if (DECL_WEAK (expr) && !DECL_COMDAT (expr))
{
struct cgraph_node *node;
if (!DECL_EXTERNAL (expr))
@@ -2596,7 +2596,7 @@ 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))
+ if (DECL_WEAK (expr) && !DECL_COMDAT (expr))
{
struct varpool_node *node;
if (!DECL_EXTERNAL (expr))