This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Bootstrap failure in libiberty/cplus-dem.c
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: dnovillo at redhat dot com
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: 10 Mar 2003 19:10:50 +0100
- Subject: Re: [tree-ssa] Bootstrap failure in libiberty/cplus-dem.c
- References: <1047310626.1099.118.camel@steven>
Op ma 10-03-2003, om 16:37 schreef Steven Bosscher:
> I tried to do a C-only bootstrap of the current tree-ssa branch on
> i586-pc-linux-gnu. Stage 0 compiler is GCC 2.95.3 (SuSE 7.2),
> stage 2 and compare do not fail.
Here's a test case I cut out of cplus-dem.c. I started with cutting
down that file to the bare minimum that triggers the bug, but the result
looked quite easy to compile to me:
---- 8< ----
#include <string.h>
static void
demangle_prefix (void)
{
const char *scan;
int i;
i = strspn (scan, "_");
if (i > 2)
{
scan += (i - 2);
}
}
---- 8< ----
So I preprocessed this and cut away all the cruft. It turns out that
strspn function is inlined, and a very small test case is:
---- 8< ----
typedef unsigned int size_t;
extern __inline size_t
__strspn_c1 (__const char *__s, char __accept)
{
register size_t __result = 0;
while (__s[__result] == __accept)
++__result;
return __result;
}
static void
demangle_prefix (void)
{
const char *scan;
char __a0 = ((__const char *) ("_"))[0];
int i;
i = __strspn_c1 (scan, __a0);
}
---- 8< ----
# ./xgcc -B/home/steven/devel/gcc/build-ssa/gcc/ -B/opt/experimental/i586-pc-linux-gnu/bin/ -B/opt/experimental/i586-pc-linux-gnu/lib/ -isystem /opt/experimental/i586-pc-linux-gnu/include -c -O bug.c
bug.c: In function `demangle_prefix':
bug.c:8: internal compiler error: in copy_to_mode_reg, at explow.c:731
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Line 8 is the "while (__s[__result] == __accept) line.
That's about the best I can do for you, hope it helps.
Greetz
Steven