This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/42715] [4.5 Regression] output_operand: invalid expression as operand
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2010 11:56:54 -0000
- Subject: [Bug other/42715] [4.5 Regression] output_operand: invalid expression as operand
- References: <bug-42715-11764@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jakub at gcc dot gnu dot org 2010-01-13 11:56 -------
More reduced testcase (-m32 -g -O2 -fpic):
struct A { unsigned a1; char a2[15]; };
struct B { long b1; unsigned char b2; long b3; };
struct C { void *c1; unsigned c2; unsigned c3; };
static struct A v1;
struct A *const v2 = &v1;
static inline
int foo (void)
{
int *v;
__asm__ __volatile__ ("" : "=r" (v));
return v[1];
}
static void
bar (struct C *x)
{
if (x->c2 == x->c3 && x->c1)
f1 (foo (), x->c1, x->c3 * sizeof (x->c1[0]));
}
void
baz (struct B *y)
{
int i;
const char *j;
char *k;
char x[64];
for (i = 0; i < sizeof (struct B); i++, y)
{
switch (y->b2)
{
case 0x20:
if (__builtin_strchr (j, '='))
continue;
}
switch (y->b2)
{
case 0x80:
bar (&x);
f2 (y->b3);
case 0x2e:
case 0x4e:
break;
default:
if (v2->a1)
f2 (y->b2);
}
k[0] = '\0';
if (v2->a1)
f2 (y->b1);
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42715