summaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-12 15:38:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-12 15:38:33 +0000
commita5a520294191da394b276e6dc3296fe90f7ec63e (patch)
tree4a62a67e3a8e21cef0635a81ac2fdea84504ea8c /gcc/cp/except.c
parent34b620bbddef3fbcdc1d5d9b441cd520c25e7987 (diff)
downloadgcc-a5a520294191da394b276e6dc3296fe90f7ec63e.tar.gz
PR sanitizer/64984
* except.c (check_noexcept_r): Return NULL for internal calls. * g++.dg/ubsan/pr64984.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220649 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 6aff7b59439..3ff1ce607ee 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -1148,7 +1148,7 @@ check_noexcept_r (tree *tp, int * /*walk_subtrees*/, void * /*data*/)
{
tree t = *tp;
enum tree_code code = TREE_CODE (t);
- if (code == CALL_EXPR
+ if ((code == CALL_EXPR && CALL_EXPR_FN (t))
|| code == AGGR_INIT_EXPR)
{
/* We can only use the exception specification of the called function