Java: Fix PR 16701
Bryce McKinlay
mckinlay@redhat.com
Wed Aug 4 17:59:00 GMT 2004
Andrew Haley wrote:
>Bryce McKinlay writes:
> > This patch fixes PR 16701. fold_constant_for_init() recursively resolves
> > other constants, but it didn't update the global current_class before
> > calling resolve_field_access(). This resulted in access checks being
> > performed from the wrong context.
>
>I think you need to check the return value of resolve_field_access().
>If resolve_field_access() fails returning error_mark_node, no-one has
>initialized decl.
>
>
I agree. Note that the original code had this bug too. I've checked in
this variant which adds a check for an error_mark_node return value from
resolve_field_access (resolve_field_access should never return NULL,
only a valid decl or error_mark_node)
Regards
Bryce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcj-PR16701-2.patch
Type: text/x-patch
Size: 1269 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040804/ed1cd104/attachment.bin>
More information about the Java-patches
mailing list