https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77826
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Wed Oct 5 11:38:59 2016 New Revision: 240776 URL: https://gcc.gnu.org/viewcvs?rev=240776&root=gcc&view=rev Log: 2016-10-05 Richard Biener <rguent...@suse.de> PR middle-end/77826 * genmatch.c (dt_operand::gen_match_op): Amend operand_equal_p with types_match for GIMPLE code gen to handle type mismatched constants properly. (dt_operand::gen): Adjust. * match.pd ((X /[ex] A) * A -> X): Properly handle converted and constant A. * gcc.dg/torture/pr77826.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr77826.c Modified: trunk/gcc/ChangeLog trunk/gcc/genmatch.c trunk/gcc/match.pd trunk/gcc/testsuite/ChangeLog