This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/41577] Broken code with -O -ftree-vrp



------- Comment #7 from rguenth at gcc dot gnu dot org  2009-10-05 12:03 -------
A fix is to write

uint32 res = ((uint32)(uint16)(cpu->gprs[12]  >> 16)
              * (uint32)(uint16)(cpu->gprs[16] >> 16));

instead to force the multiplication in an unsigned type.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]