This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/46556] Code size regression in struct access
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Nov 2010 10:40:16 +0000
- Subject: [Bug rtl-optimization/46556] Code size regression in struct access
- Auto-submitted: auto-generated
- References: <bug-46556-4@http.gcc.gnu.org/bugzilla/>
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]);
}