From 18f6a10ac3695fd53eb0960d444333584a9875ec Mon Sep 17 00:00:00 2001
From: Charles Baylis <charles.baylis@linaro.org>
Date: Thu, 27 Aug 2015 17:38:16 +0100
Subject: [PATCH] fix up can_throw_external in cgraph_node::create_wrapper

gcc/ChangeLog:

<DATE>  Charles Baylis  <charles.baylis@linaro.org>

	* cgraphunit.c (cgraph_node::create_wrapper): Set can_throw_external
	in new callgraph edge.

Change-Id: I13423872e37f3ca8e0bd61e8eac4a06e8e107a2c
---
 gcc/cgraphunit.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index be16f5d..278515d 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2543,6 +2543,7 @@ cgraph_node::create_wrapper (cgraph_node *target)
   memset (&thunk, 0, sizeof (cgraph_thunk_info));
   thunk.thunk_p = true;
   create_edge (target, NULL, count, CGRAPH_FREQ_BASE);
+  callees->can_throw_external = !TREE_NOTHROW (target->decl);
 
   tree arguments = DECL_ARGUMENTS (decl);
 
-- 
1.9.1

