From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15962 invoked by alias); 27 Jan 2005 21:26:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15918 invoked by uid 48); 27 Jan 2005 21:26:25 -0000 Date: Thu, 27 Jan 2005 21:26:00 -0000 Message-ID: <20050127212625.15917.qmail@sourceware.org> From: "steven at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050127195923.19659.kazu@cs.umass.edu> References: <20050127195923.19659.kazu@cs.umass.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/19659] GCC does not remove an "if" statement that never triggers. X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg04085.txt.bz2 List-Id: ------- Additional Comments From steven at gcc dot gnu dot org 2005-01-27 21:26 ------- The lang hook thinks that with the 'const' the types of 'dest' and 'orig' in may_propagate_copy are not the same. (gdb) 2820 else if (!may_propagate_copy (op, val)) 4: debug_generic_stmt (stmt) = # VUSE ; D.1457_8 = *lengthp2D.1453_7; void (gdb) p may_propagate_copy (op, val) $17 = 0 '\0' In may_propagate_copy : (gdb) next 111 if (mt_dest && mt_orig && mt_dest != mt_orig) (gdb) 113 else if (!lang_hooks.types_compatible_p (type_d, type_o)) (gdb) 156 } (gdb) p debug_generic_expr(dest) lengthp2D.1453_7 $18 = void (gdb) p debug_generic_expr(orig) lengthpD.1449_3 (gdb) p lang_hooks.types_compatible_p (type_d, type_o) $20 = 0 (gdb) p debug_tree (type_d) unit size align 32 symtab 0 alias set -1 precision 32 min max pointer_to_this > unsigned DI size constant invariant 64> unit size constant invariant 8> align 64 symtab 0 alias set -1> $21 = void (gdb) p debug_tree (type_o) unit size align 32 symtab 0 alias set -1 precision 32 min max pointer_to_this > unsigned DI size constant invariant 64> unit size constant invariant 8> align 64 symtab 0 alias set -1> $22 = void -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19659