Fix PR tree-optimization/71239.
* g++.dg/pr71239.C: New test.
PR tree-optimization/71239
* tree.c (array_at_struct_end_p): Do not call operand_equal_p
if DECL_SIZE is NULL.
From-SVN: r236696
+2016-05-25 Martin Liska <mliska@suse.cz>
+
+ PR tree-optimization/71239
+ * tree.c (array_at_struct_end_p): Do not call operand_equal_p
+ if DECL_SIZE is NULL.
+
2016-05-25 Richard Biener <rguenther@suse.de>
* timevar.def (TV_TREE_LOOP_IFCVT): Add.
+2016-05-25 Martin Liska <mliska@suse.cz>
+
+ * g++.dg/pr71239.C: New test.
+
2016-05-25 Richard Biener <rguenther@suse.de>
* gcc/testsuite/gcc.dg/vect/pr58135.c: Rename to ...
is valid because BUF allocate enough space. */
- && (!size || operand_equal_p (DECL_SIZE (ref), size, 0))
+ && (!size || (DECL_SIZE (ref) != NULL
+ && operand_equal_p (DECL_SIZE (ref), size, 0)))
&& !(flag_unconstrained_commons
&& TREE_CODE (ref) == VAR_DECL && DECL_COMMON (ref)))
return false;