------- Comment #4 from pinskia at gcc dot gnu dot org 2008-12-21 22:04 ------- Anyways I have a simple fix, just use fold_convert in some places in fold-const.c for the folding of -A / -B into A/B.
Note it was really caused by: r107543 | pinskia | 2005-11-26 17:18:04 -0500 (Sat, 26 Nov 2005) | 13 lines 2005-11-26 Andrew Pinski <pins...@physics.uc.edu> PR middle-end/23669 * fold-const.c (fold_binary): Convert -A/-B to A/B for signed types when overflow is undefined. 2005-11-26 Andrew Pinski <pins...@physics.uc.edu> PR middle-end/23669 * gcc.dg/tree-ssa/divide-1.c: New test. * gcc.dg/tree-ssa/divide-2.c: New test. :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38590