[Bug middle-end/56250] Wrong constant folding on unsigned int

2013-02-08 Thread jakub at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56250



Jakub Jelinek jakub at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2013-02-08

 CC||jakub at gcc dot gnu.org

 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org 2013-02-08 
08:31:03 UTC ---

Bug is in extract_muldiv_1.


[Bug middle-end/56250] Wrong constant folding on unsigned int

2013-02-07 Thread pinskia at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56250



Andrew Pinski pinskia at gcc dot gnu.org changed:



   What|Removed |Added



   Keywords||wrong-code

  Component|c   |middle-end



--- Comment #2 from Andrew Pinski pinskia at gcc dot gnu.org 2013-02-08 
01:54:23 UTC ---

Actually I get the correct results with the split out one.  The problem is

division is being merged together over the negative which is not valid for

wrapping cases.


[Bug middle-end/56250] Wrong constant folding on unsigned int

2013-02-07 Thread ishiura-compiler at ml dot kwansei.ac.jp


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56250



--- Comment #3 from Ishiura Lab Compiler Team ishiura-compiler at ml dot 
kwansei.ac.jp 2013-02-08 01:59:18 UTC ---

(In reply to comment #1)

 When I do this:

  unsigned x = 2;

  unsigned t = (x/2);

  unsigned t1 = -t;

  unsigned t2 = t2/2;

 

 t2 is 0 which is correct.  I don't see why 2147483647 is correct.



The last line should be

unsigned t2 = t1/2;