From ca9d1f7cffb031ee4174ee3e032cfad204d35e78 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 17 Aug 2015 18:40:57 +0000 Subject: * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226947 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/except.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/cp/except.c') diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 6c366464fba..4f06f52d1da 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -1155,7 +1155,9 @@ check_noexcept_r (tree *tp, int * /*walk_subtrees*/, void * /*data*/) We could use TREE_NOTHROW (t) for !TREE_PUBLIC fns, though... */ tree fn = (code == AGGR_INIT_EXPR ? AGGR_INIT_EXPR_FN (t) : CALL_EXPR_FN (t)); - tree type = TREE_TYPE (TREE_TYPE (fn)); + tree type = TREE_TYPE (fn); + gcc_assert (POINTER_TYPE_P (type)); + type = TREE_TYPE (type); STRIP_NOPS (fn); if (TREE_CODE (fn) == ADDR_EXPR) -- cgit v1.2.1