This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/16114] New: Hang in cse.c (flush_hash_table)
- 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: 21 Jun 2004 13:13:14 -0000
- Subject: [Bug rtl-optimization/16114] New: Hang in cse.c (flush_hash_table)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following testcase hangs the compiler when targeting ppc64-redhat-linux
at -O2, -Os and -O3.
void *f1 (void);
int f2 (void *x, int *y);
unsigned long f3 (void *x, const void *y, unsigned long z);
unsigned long *f4 (unsigned long *x);
void f5 (void *x, int y);
long
foo (void *x)
{
int a = 0, c, g = 0;
void *b;
unsigned long *d = 0, f;
unsigned long e = 172;
b = f1 ();
retry:
a = f2 (b, &c);
if (a == -11)
goto retry;
else if (a)
{ a = -11; goto out; }
g = 1;
if (x)
{
if (f3 (&f, x, sizeof (f)))
{ a = -14; goto out; }
if ((d = f4 (&f)) && (*d & 0x00000004))
d = 0;
if (!d)
{ a = -22; goto out; }
}
else
asm volatile ("" : : "r" (e));
out:
if (a)
f5 (b, g);
return a;
}
Distilled from current Linux kernel.
>From what I saw so far, it seems the hang is because unlike other
delete_reg_equiv callers, merge_equiv_classes calls remove_from_table just once
for particular regno. In this testcase, there are multiple REGs with the same
regno in the table (a variable, one with SImode and one with DImode),
delete_reg_equiv changes REG_QTY of the register and thus the other table entry
is never found, as its hash value changed, but it was not moved.
Whether this is the only problem remains to be seen.
GCC 3.3.x compiles this testcase just fine.
--
Summary: Hang in cse.c (flush_hash_table)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: arjanv at redhat dot com,gcc-bugs at gcc dot gnu dot org
GCC target triplet: ppc64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16114