aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2015-12-02 19:29:17 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2015-12-02 19:29:17 +0000
commitd6221ad4589004958d05d4ac3cb7104881dfe896 (patch)
tree9db43fa3298a0062b79157e3f4c3b81bbfef6ef2 /gcc/tree.c
parent105b682e138221fe33886c43379cdf3110112c74 (diff)
downloadgcc-d6221ad4589004958d05d4ac3cb7104881dfe896.zip
gcc-d6221ad4589004958d05d4ac3cb7104881dfe896.tar.gz
gcc-d6221ad4589004958d05d4ac3cb7104881dfe896.tar.bz2
re PR c++/68653 (ICE: in nonnull_arg_p, at tree.c:13853)
PR c++/68653 * tree.c (nonnull_arg_p): Allow OFFSET_TYPE. * g++.dg/warn/nonnull3.C: New test. From-SVN: r231200
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 587bd74..bd5cf73 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -13848,7 +13848,9 @@ nonnull_arg_p (const_tree arg)
tree t, attrs, fntype;
unsigned HOST_WIDE_INT arg_num;
- gcc_assert (TREE_CODE (arg) == PARM_DECL && POINTER_TYPE_P (TREE_TYPE (arg)));
+ gcc_assert (TREE_CODE (arg) == PARM_DECL
+ && (POINTER_TYPE_P (TREE_TYPE (arg))
+ || TREE_CODE (TREE_TYPE (arg)) == OFFSET_TYPE));
/* The static chain decl is always non null. */
if (arg == cfun->static_chain_decl)