public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PR java/25366: ICE in do_resolve_class
@ 2005-12-12 15:35 Andrew Haley
  0 siblings, 0 replies; only message in thread
From: Andrew Haley @ 2005-12-12 15:35 UTC (permalink / raw)
  To: gcc-patches, java-patches

This bug is fixed on 4.0 branch but not on mainline.  It was fixed on
the branch by this patch:

2005-10-01  Bryce McKinlay  <mckinlay@redhat.com>

	PR java/23891
	* parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
	the newly created type. Set import lists here, not in create_class.
	(jdep_resolve_class): Set current_class.
	(do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
	the current package context, not ctxp->package.
	(cicp_cache): Removed.
	(class_in_current_package): Simplify implementation using
	TYPE_PACKAGE.
	* jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
	* java-tree.h (TYPE_PACKAGE): New macro.
	(struct lang_type): New member 'package'.
	* class.c (maybe_layout_super_class): Update current_class before
	calling do_resolve_class.

The patch to maybe_layout_super_class from 4.0 branch looks perfectly
reasonable and it fixes this problem on trunk and 4.1 branch.

Andrew.


2005-12-12  Andrew Haley  <aph@redhat.com>

	* class.c (maybe_layout_super_class): Update current_class before
	calling do_resolve_class.

Index: class.c
===================================================================
*** class.c	(revision 108234)
--- class.c	(working copy)
*************** maybe_layout_super_class (tree super_cla
*** 2081,2086 ****
--- 2081,2089 ----
  	super_class = TREE_TYPE (super_class);
        else
  	{
+ 	  /* Set the correct context for class resolution.  */
+ 	  current_class = this_class;
+ 
  	  /* do_resolve_class expects an EXPR_WITH_FILE_LOCATION, so
  	     we give it one.  */
  	  tree this_wrap = NULL_TREE;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-12 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-12 15:35 PR java/25366: ICE in do_resolve_class Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).