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 rtl-optimization/46556] Code size regression in struct access


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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |UNCONFIRMED
     Ever Confirmed|1                           |0

--- Comment #3 from Alan Modra <amodra at gmail dot com> 2010-11-22 10:40:01 UTC ---
Yes, within a loop we get the expected addressing.  Updated testcase:

/* -Os -mcpu=405 -msoft-float */
struct x
{
  int a[16];
  int b[16];
  int c[16];
};

extern void foo (int, int, int);

void
f (struct x *p, unsigned int n)
{
  foo (p->a[n], p->c[n], p->b[n]);
}

void
g (struct x *p, unsigned int n)
{
  int i;

  for (i = 0; i < n; i++)
    foo (p->a[i], p->c[i], p->b[i]);
}


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