[PR 88214] Assert that ptr is a pointer
authorMartin Jambor <mjambor@suse.cz>
Thu, 20 Dec 2018 14:14:22 +0000 (15:14 +0100)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 20 Dec 2018 14:14:22 +0000 (15:14 +0100)
2018-12-20  Martin Jambor  <mjambor@suse.cz>

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
gcc/tree-ssa-alias.c

index e405a4a882549f03fd127bb0d04a69f1fc9fb65a..4a7fb435d202c285fae86546903d08720bbc1169 100644 (file)
@@ -1,3 +1,9 @@
+2018-12-20  Martin Jambor  <mjambor@suse.cz>
+
+       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  <rguenther@suse.de>
 
        PR tree-optimization/84362
index 85a5de7ce0532cc1d2dbc0883731edb02471c53a..66cf2f2c669d48a28ff2c86bccd222e4f87a1394 100644 (file)
@@ -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;