aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2014-11-13 15:36:48 +0000
committerTeresa Johnson <tejohnson@gcc.gnu.org>2014-11-13 15:36:48 +0000
commit37e10165c13e9860dabbf6eaf85481debec459e9 (patch)
treeb15747ba3fade3c6296ce7777f365b466280d4b7 /gcc/tree.c
parent6fad471b8f1a62c385624bf4cecbd57c397bbe91 (diff)
downloadgcc-37e10165c13e9860dabbf6eaf85481debec459e9.zip
gcc-37e10165c13e9860dabbf6eaf85481debec459e9.tar.gz
gcc-37e10165c13e9860dabbf6eaf85481debec459e9.tar.bz2
re PR tree-optimization/63841 (Incorrect strlen optimization after complete unroll)
2014-11-13 Teresa Johnson <tejohnson@google.com> gcc: PR tree-optimization/63841 * tree.c (initializer_zerop): A clobber does not zero initialize. gcc/testsuite: PR tree-optimization/63841 * g++.dg/tree-ssa/pr63841.C: New test. From-SVN: r217505
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 221f0dd..cf37a19 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10330,6 +10330,8 @@ initializer_zerop (const_tree init)
{
unsigned HOST_WIDE_INT idx;
+ if (TREE_CLOBBER_P (init))
+ return false;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (init), idx, elt)
if (!initializer_zerop (elt))
return false;