RFC - PR java/8608: ICE if WFL not yet set in check_init()

Ranjit Mathew rmathew@gmail.com
Thu Feb 10 01:39:00 GMT 2005


  The ICE in PR java/8608 happens because WFL does
not get set before parse_error_context() and thence
issue_warning_error_from_context() is called from

WFL is set in check_init() only when
"case EXPR_WITH_FILE_LOCATION" is executed, which
does not happen in the path for the testcase in the

I could think of the following ways of solving this:

1. Ensure that every expression is wrapped in an EWFL.

2. Make issue_warning_error_from_context() handle an
empty CL (EWFL) argument.

3. If WFL is NULL, wrap the offending declaration in
a suitable EWFL.

#1 solved the PR per-se, but led to other problems
building libjava - the current front-end is too
fragile for this.

#2 makes the diagnostic cursor always be at the last
line of the input file.

#3 is ugly, but at least solves the PR and shows
the correct line number (albeit the wrong column
for multiple variable declarations).

Thoughts on improving this?

Needless to say, I'm not too happy with the attached
patch, but for whatever it is worth, it cleanly
builds libjava and produces no regressions in the
testsuite (including Jacks) on i686-pc-linux-gnu.

The patch does not handle USE_MAPPED_LOCATION as
I am not familiar with it.

OK for mainline if no better suggestions?


Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr8608.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050210/2f650bca/attachment.txt>

More information about the Java-patches mailing list