[Bug middle-end/44530] wrong code due to branch optimization

2010-06-14 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2010-06-14 07:35 --- > if ((unsigned int)(xCount + 32) < 0x8000) Yes even though the comparision is done in an unsigned type, the addition is done in a signed type which means the overflow of that addition is undefined. So cha

[Bug middle-end/44530] wrong code due to branch optimization

2010-06-13 Thread Daniel dot Davies at xerox dot com
--- Comment #3 from Daniel dot Davies at xerox dot com 2010-06-14 02:49 --- Thank You! Adding the -fwrapv flag fixed the problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44530

[Bug middle-end/44530] wrong code due to branch optimization

2010-06-13 Thread pinskia at gmail dot com
--- Comment #2 from pinskia at gmail dot com 2010-06-13 21:58 --- Subject: Re: New: wrong code due to branch optimization Sent from my iPhone On Jun 13, 2010, at 2:34 PM, "Daniel dot Davies at xerox dot com" wrote: > When compiled with -03, the attached file prints out an error

[Bug middle-end/44530] wrong code due to branch optimization

2010-06-13 Thread Daniel dot Davies at xerox dot com
--- Comment #1 from Daniel dot Davies at xerox dot com 2010-06-13 21:35 --- Created an attachment (id=20905) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20905&action=view) Preprocessed source file -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44530