[Bug tree-optimization/19835] [4.0 Regression] [AVR] Loop variable gets widened to LONG instead of int

schlie at comcast dot net gcc-bugzilla@gcc.gnu.org
Mon Feb 14 00:37:00 GMT 2005


------- Additional Comments From schlie at comcast dot net  2005-02-13 18:30 -------
(In reply to comment #1)
> There has to be a reason why we want to use long int instead of the integer
> type which is the same size 

There's no doubt that someone may have thought so, but it's wrong;
as there's no valid reason to effectively transform (int)j into a temp of
any greater rank unsigned type. (as there is no valid reason to ever
require an unsigned index to memory of greater rank than a pointer). 

Further, given that GCC knows the bounds of the variable (i.e. 0 >= j <= 19)
temp should most correctly have been typed as an (unsigned char) QI mode.
(which undoubtedly could only likely help subsequent optimizations to know)


-- 


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



More information about the Gcc-bugs mailing list