This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: New boostrap failure: ICE in cpplex.c:365
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Kean Johnston <jkj at sco dot com>, gcc-patches at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Sat, 19 Apr 2003 08:42:31 +0100
- Subject: Re: New boostrap failure: ICE in cpplex.c:365
- References: <00cb01c30617$23656d50$03419384@shrike> <20030419073315.GN23814@daikokuya.co.uk>
Neil Booth wrote:-
> Kean Johnston wrote:-
>
> > I suspect this is a glitch in the recent change by Neil Booth
> > to all the cpp stuff. Just a heads up ...
> >
> > stage1/xgcc -Bstage1/ -B/usr/gnu/i586-pc-sco3.2v5.0/bin/ -c -g -O2
> > -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
> > -Wmissing-prototypes -pedantic -Wno-long-long -Werror -fno-common
> > -DHAVE_CONFIG_H -I. -I. -I/u/cvs/gcc/gcc -I/u/cvs/gcc/gcc/.
> > -I/u/cvs/gcc/gcc/config -I/u/cvs/gcc/gcc/../include
> > /u/cvs/gcc/gcc/cpplex.c -o cpplex.o
> > /u/cvs/gcc/gcc/cpplex.c: In function `skip_whitespace':
> > /u/cvs/gcc/gcc/cpplex.c:365: error: verify_flow_info: REG_BR_PROB does
> > not match cfg 9000 1000
> > /u/cvs/gcc/gcc/cpplex.c:365: internal compiler error: verify_flow_info
> > failed
>
> I've reproduced this. Let me see if a simple code rearrangement works
> around it.
I'm applying this without a full bootstrap to avoid this problem.
Honza, could you have a look into why the original fails a
verify_flow_info assertion?
Neil.
* skip_whitespace: Rearrange to avoid stage1 ICE.
Index: cpplex.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cpplex.c,v
retrieving revision 1.221
diff -u -p -r1.221 cpplex.c
--- cpplex.c 19 Apr 2003 00:22:48 -0000 1.221
+++ cpplex.c 19 Apr 2003 07:40:16 -0000
@@ -334,7 +334,7 @@ skip_whitespace (pfile, c)
cppchar_t c;
{
cpp_buffer *buffer = pfile->buffer;
- unsigned int warned = 0;
+ bool saw_NUL = false;
do
{
@@ -343,13 +343,7 @@ skip_whitespace (pfile, c)
;
/* Just \f \v or \0 left. */
else if (c == '\0')
- {
- if (!warned)
- {
- cpp_error (pfile, DL_WARNING, "null character(s) ignored");
- warned = 1;
- }
- }
+ saw_NUL = true;
else if (pfile->state.in_directive && CPP_PEDANTIC (pfile))
cpp_error_with_line (pfile, DL_PEDWARN, pfile->line,
CPP_BUF_COL (buffer),
@@ -360,6 +354,9 @@ skip_whitespace (pfile, c)
}
/* We only want non-vertical space, i.e. ' ' \t \f \v \0. */
while (is_nvspace (c));
+
+ if (saw_NUL)
+ cpp_error (pfile, DL_WARNING, "null character(s) ignored");
buffer->cur--;
}