public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/16187] New: extra casts to unsigned int generated for array references
@ 2004-06-25  0:52 dann at godzilla dot ics dot uci dot edu
  2004-06-25 22:58 ` [Bug middle-end/16187] " dann at godzilla dot ics dot uci dot edu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-06-25  0:52 UTC (permalink / raw)
  To: gcc-bugs

The .vars dump for this function:

int f1(int *  data, int j)
{
      return  data[j];                                 
}

looks like: 

  return *((int *)((unsigned int)j * 4) + data);

The cast to "unsigned int" is probably not needed, emitting it increases the
number of statements generated, so it probably increases the memory consumption
and the amount of work the optimizers have to perform.

-- 
           Summary: extra casts to unsigned int generated for array
                    references
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dann at godzilla dot ics dot uci dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-24  1:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-25  0:52 [Bug middle-end/16187] New: extra casts to unsigned int generated for array references dann at godzilla dot ics dot uci dot edu
2004-06-25 22:58 ` [Bug middle-end/16187] " dann at godzilla dot ics dot uci dot edu
2004-06-25 23:04 ` pinskia at gcc dot gnu dot org
2004-06-26 11:49 ` falk at debian dot org
2005-03-26  5:38 ` [Bug middle-end/16187] ARRAY_REF should be used for pointers also pinskia at gcc dot gnu dot org
2005-07-24  1:03 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).