[Bug fortran/42131] Weird translation of DO loops

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Fri Nov 27 09:48:00 GMT 2009



------- Comment #18 from rguenther at suse dot de  2009-11-27 09:48 -------
Subject: Re:  Weird translation of DO loops

On Thu, 26 Nov 2009, tkoenig at gcc dot gnu dot org wrote:

> ------- Comment #15 from tkoenig at gcc dot gnu dot org  2009-11-26 23:43 -------
> (In reply to comment #14)
> 
> > Looks much better than the current situation.  Is there a valid
> > reason for the character(kind=4) casts?  I would have thought
> > that this should be a integer(kind=4).
> 
> The casts are generated for unsigned types, which we need because
> the difference between two integers can be larger than huge(integer).
> Beats me why this is character instead of unsigned.

Well, in that case you can as well rely on twos-complement
arithmetic and avoid all the overflow issues?

Richard.


-- 


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



More information about the Gcc-bugs mailing list