From 49fb2968516474bf2d825b62933e2ddcdef2c296 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Thu, 20 Dec 2018 15:14:22 +0100 Subject: [PATCH] [PR 88214] Assert that ptr is a pointer 2018-12-20 Martin Jambor PR ipa/88214 * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that ptr is a pointer. From-SVN: r267298 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-alias.c | 1 + 2 files changed, 7 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e405a4a8825..4a7fb435d20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-12-20 Martin Jambor + + PR ipa/88214 + * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that + ptr is a pointer. + 2018-12-20 Richard Biener PR tree-optimization/84362 diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 85a5de7ce05..66cf2f2c669 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -710,6 +710,7 @@ ao_ref_init_from_ptr_and_size (ao_ref *ref, tree ptr, tree size) } else { + gcc_assert (POINTER_TYPE_P (TREE_TYPE (ptr))); ref->base = build2 (MEM_REF, char_type_node, ptr, null_pointer_node); ref->offset = 0; -- 2.30.2