http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52578
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-14 10:51:38 UTC --- Author: rguenth Date: Wed Mar 14 10:51:34 2012 New Revision: 185378 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185378 Log: 2012-03-14 Richard Guenther <rguent...@suse.de> PR middle-end/52578 * fold-const.c (fold_unary_loc): Fold (T1)(T2)x to (T1)x if the outermost conversion is a sign-change only. (fold_binary_loc): Disregard widening and sign-changing conversions when we determine if two variables are equal for reassociation. * tree-ssa-forwprop.c (combine_conversions): Fold (T1)(T2)x to (T1)x if the outermost conversion is a sign-change only. * gcc.dg/pr52578.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr52578.c Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-forwprop.c