From: hubicka Date: Fri, 16 Oct 2015 03:10:27 +0000 (+0000) Subject: * ipa-icf-gimple.c (func_checker::compare_operand): Compare only X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63570ab2fe38a535f94d03d002bd493f1a1b8e79;p=thirdparty%2Fgcc.git * ipa-icf-gimple.c (func_checker::compare_operand): Compare only empty constructors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228860 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17e690e33240..dc82c3dc8a24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-11 Jan Hubicka + + * ipa-icf-gimple.c (func_checker::compare_operand): Compare only + empty constructors. + 2015-10-16 Michael Collison Andrew Pinski diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index 4696c803617b..934ba9057649 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -415,20 +415,9 @@ func_checker::compare_operand (tree t1, tree t2) switch (TREE_CODE (t1)) { case CONSTRUCTOR: - { - unsigned length1 = vec_safe_length (CONSTRUCTOR_ELTS (t1)); - unsigned length2 = vec_safe_length (CONSTRUCTOR_ELTS (t2)); - - if (length1 != length2) - return return_false (); - - for (unsigned i = 0; i < length1; i++) - if (!compare_operand (CONSTRUCTOR_ELT (t1, i)->value, - CONSTRUCTOR_ELT (t2, i)->value)) - return return_false(); - - return true; - } + gcc_assert (!vec_safe_length (CONSTRUCTOR_ELTS (t1)) + && !vec_safe_length (CONSTRUCTOR_ELTS (t2))); + return true; case ARRAY_REF: case ARRAY_RANGE_REF: /* First argument is the array, second is the index. */