This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: RFA: Fix PR java/14853


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]