summaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-17 18:40:57 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-17 18:40:57 +0000
commitca9d1f7cffb031ee4174ee3e032cfad204d35e78 (patch)
treeaf4a10d8886279611a97019b105aff591fe9ff51 /gcc/cp/except.c
parent75c2bf3a193118777c36f796d186f6b052a0ea83 (diff)
downloadgcc-ca9d1f7cffb031ee4174ee3e032cfad204d35e78.tar.gz
* 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
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c4
1 files changed, 3 insertions, 1 deletions
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)