This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/42662] [4.5 Regression] invalid rtl sharing found in the insn
- 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: 9 Jan 2010 17:25:17 -0000
- Subject: [Bug debug/42662] [4.5 Regression] invalid rtl sharing found in the insn
- References: <bug-42662-9596@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jakub at gcc dot gnu dot org 2010-01-09 17:25 -------
Smaller testcase that ICEs at -g -O2:
struct S { unsigned long s[17]; };
static inline void
foo (struct S *r, struct S *a, unsigned n)
{
unsigned b = n / 8;
r->s[0] = (b >= 1 ? : a->s[1 - b]);
}
static inline void
bar (struct S *r, struct S *a)
{
r->s[0] = a->s[0] << 1;
}
static inline void
baz (struct S *r, struct S *a, struct S *b)
{
unsigned c = 0;
int i;
for (i = 0; i < 3; ++i)
{
unsigned long d = a->s[i];
long e = d + b->s[i];
if (c)
++e == 0;
c = e < d;
r->s[i] = e;
}
}
void
test (struct S *r, int s, int d)
{
struct S u;
if (s)
{
bar (&u, r);
foo (r, r, 3);
baz (r, r, &u);
}
u.s[0] = d;
baz (r, r, &u);
}
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-09 17:25:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42662