BUG: -funroll-all-loops generates unresolved externals
Manfred Hollstein
manfredh@redhat.com
Thu Aug 3 03:54:00 GMT 2000
Hi there,
When bootstrapping a recent checkout from the mainline sources on
i586-redhat6-linux-gnu using BOOT_CFLAGS="-O9 -funroll-all-loops" I
ended up with an unresolved external while creating cc1chill.
Further analysis has shown, that compiling loops of the following form
using -funroll-all-loops generates jumps to labels, which won't exist
in the final output any more:
for (;;)
{
ch = input ();
if (ISALNUM (ch))
obstack_1grow (&temporary_obstack, ch);
else if (ch != '_')
break;
}
Rewriting this loop to use a do { ... } while (...) construct can be
used as a work-around:
do
{
ch = input ();
if (ISALNUM (ch))
obstack_1grow (&temporary_obstack, ch);
} while (ch == '_');
BTW, this is an excerpt from gcc/ch/lex.c.
OK to install the attached testcase?
Cheers, manfred.
More information about the Gcc-bugs
mailing list