From: Jason Merrill Date: Mon, 17 Aug 2015 18:40:57 +0000 (-0400) Subject: * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c563482ac83d8d2874f2cd4f608eae57d966dee;p=gcc.git * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P. From-SVN: r226947 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a5a42ff11a5..595781cdb3e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2015-08-17 Jason Merrill + + * except.c (check_noexcept_r): Assert that fn is POINTER_TYPE_P. + 2015-08-14 Jason Merrill PR c++/65974 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)