This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/33970] Missed optimization using unsigned char loop variable
- From: "henning dot m at insightbb dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Nov 2007 12:37:32 -0000
- Subject: [Bug middle-end/33970] Missed optimization using unsigned char loop variable
- References: <bug-33970-15294@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from henning dot m at insightbb dot com 2007-11-06 12:37 -------
(In reply to comment #8)
> (In reply to comment #7)
> > With Mike's description in comment #6, confirmed on 4.1.2 and 4.2.2. AVR GCC
> > 4.2.2 is worse than 4.1.2, in that even if sub2 is called with (x+1), the
> > variable is still 16 bits.
> >
>
> There is something more going on, this is the assembler output when sub2 is not
> in the same file, and calling sub2(x), i.e not x+1:
> ===================================================================
I think you will also find that if x is changed from ststic to auto the same
problem appears.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33970