diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-17 22:32:29 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-17 22:32:29 +0000 |
commit | 86b16df304c6d769513c08990d5c4cd46ec14098 (patch) | |
tree | e9ef6bd5ecb20983f0c0ae646bc2bfd807cae4e6 /gcc/tree-eh.c | |
parent | 62402a04aade33d3cc9cfa851b5d4b3cab4fd4bb (diff) | |
download | gcc-86b16df304c6d769513c08990d5c4cd46ec14098.tar.gz |
PR tree-optimization/19917
* tree-eh.c (tree_could_trap_p): Consider calls to weak functions
to be potentially trapping.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95200 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-eh.c')
-rw-r--r-- | gcc/tree-eh.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 20660e4e279..34c5cab921c 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -1840,6 +1840,13 @@ tree_could_trap_p (tree expr) return true; return false; + case CALL_EXPR: + t = get_callee_fndecl (expr); + /* Assume that calls to weak functions may trap. */ + if (!t || !DECL_P (t) || DECL_WEAK (t)) + return true; + return false; + default: /* Any floating arithmetic may trap. */ if (fp_operation && flag_trapping_math) |