Patch: RFA: Fix PR java/14853
Andrew Haley
aph@redhat.com
Mon Dec 6 15:04:00 GMT 2004
Tom Tromey writes:
> This patch fixes PR java/14853, an old regression.
>
> We correctly reject the test code when compiling to .class, but not
> when compiling to .o. In the latter case, we generate trees that the
> definite assignment code does not recognize. In particular a static
> field reference is wrapped in a COMPOUND_EXPR whose LHS initializes
> the target class.
>
> This patch unwraps the COMPOUND_EXPR. I believe this is safe as this
> is the only time we can create a COMPOUND_EXPR wrapping a variable
> reference.
>
> Tested on x86 FC2. Test case included.
>
> Ok?
>
> Tom
>
> Index: gcc/java/ChangeLog
> from Tom Tromey <tromey@redhat.com>
>
> PR java/14853:
> * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
Eeeeh, OK. This is nasty stuff.
Thanks,
Andrew.
More information about the Java-patches
mailing list