https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64307
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- Init called for 2 items (100.00%). false returned: 'Unknown TREE code reached' (compare_operand:480) false returned: 'memory operands are different' (compare_gimple_assign:785) different statement for code: GIMPLE_ASSIGN (compare_bb:638): _2 = REALPART_EXPR <a>; _2 = REALPART_EXPR <a>; false returned: '' (equals_private:537) surely latent (the above is without -fPIC). Index: gcc/ipa-icf-gimple.c =================================================================== --- gcc/ipa-icf-gimple.c (revision 219520) +++ gcc/ipa-icf-gimple.c (working copy) @@ -448,6 +448,8 @@ func_checker::compare_operand (tree t1, return return_with_debug (ret); } + case IMAGPART_EXPR: + case REALPART_EXPR: case ADDR_EXPR: { x1 = TREE_OPERAND (t1, 0); makes them compare equal, but still no transform is done, even w/o -fPIC. Note BIT_FIELD_REF handling is completely broken: case BIT_FIELD_REF: { ret = compare_decl (t1, t2); return return_with_debug (ret); } ???