------- Comment #2 from sgk at troutmask dot apl dot washington dot edu 2006-05-11 19:23 ------- Subject: Re: Testsuite ICE with -Wunused-labels
On Thu, May 11, 2006 at 06:46:22PM -0000, fxcoudert at gcc dot gnu dot org wrote: > The ICE is due to -Wunused-labels. We try to issue a warning about the label > (already marked as an error because it contains a non-numeric character) being > unused, but said label has no locus (because the parser errored out before > assigning it. > > Steve, I'm adding you in the CC list since you were the one who rewrote that > codepath a few months ago, IIRC. > > I propose we strengthen the errorn in that case and also for the "Too many > digits" and "Zero is not a valid label", by the following patch: > > Index: parse.c > =================================================================== > --- parse.c (revision 113671) > +++ parse.c (working copy) > @@ -439,6 +439,7 @@ > if (!gfc_is_whitespace (c)) > gfc_error_now ("Non-numeric character in statement label at %C"); > > + return ST_NONE; > } > else > { > Yes, the above looks correct; otherwise, we fall through to the decode_statement() call. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27553