This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/60131] [4.9 Regression] RTL check fail in rhs_regno
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Feb 2014 15:45:05 +0000
- Subject: [Bug rtl-optimization/60131] [4.9 Regression] RTL check fail in rhs_regno
- Auto-submitted: auto-generated
- References: <bug-60131-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60131
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase for -O2:
struct A { short a; };
int **b;
unsigned long c;
bool foo ();
unsigned bar (unsigned i);
extern void baz () __attribute__((noreturn));
int *
test (unsigned x, struct A *y)
{
unsigned v;
if (foo () || y[x].a == -1)
{
c = bar (x);
return 0;
}
v = y[x].a;
if (v >= 23)
baz ();
return b[v];
}