[Bug java/21436] imports not remembered for previously compiled files

bonzini at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat May 7 09:23:00 GMT 2005


------- Additional Comments From bonzini at gcc dot gnu dot org  2005-05-07 09:22 -------
With this version of AWTEvent.java, this is an ice-on-valid:

   package java.awt;
   import java.util.EventObject;
   public abstract class AWTEvent extends EventObject {
       AWTEvent() { super(null); }
   }

I have prepared a patch which is now under testing, and it is really a "how 
could it have worked" situation.  When creating ctxp_for_generation we add at 
the head of the list, so passes 2 and 3 are invoked in LIFO order.  By the time 
we try to resolve AWTEvent in B.java, java_complete_class (pass 2) has not been 
done on AWTEvent yet.  It seems obvious to me that passes 2 and 3 should be 
executed in FIFO order.

In addition, find_in_imports should look at ctxp->import_list even if enclosing 
is not NULL, if enclosing's TYPE_IMPORT_LIST is NULL (likewise for 
find_in_on_demand_imports).

Patch under testing.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bonzini at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-07 09:22:59
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21436



More information about the Gcc-bugs mailing list