diff options
author | Martin Liska <mliska@suse.cz> | 2016-05-25 11:10:16 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-05-25 09:10:16 +0000 |
commit | 6aa1abe5f29491a70fda964f13427a82fd65df95 (patch) | |
tree | 3cedd4ace7a4559e46d2ca798869238026482aac /gcc/tree.c | |
parent | 6ca8e33c66be2e2ce42f2bc211f6589db37e3c7d (diff) | |
download | gcc-6aa1abe5f29491a70fda964f13427a82fd65df95.zip gcc-6aa1abe5f29491a70fda964f13427a82fd65df95.tar.gz gcc-6aa1abe5f29491a70fda964f13427a82fd65df95.tar.bz2 |
re PR tree-optimization/71239 (ICE in operand_equal_p (fold-const.c:2769))
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
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -13097,7 +13097,8 @@ array_at_struct_end_p (tree ref) 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; |