This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/16187] New: extra casts to unsigned int generated for array references


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]