This is the mail archive of the gcc-bugs@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]

[Bug java/14231] [3.4/3.5 Regression]Incorrect interface method called when compiling against .class files


------- Additional Comments From aph at redhat dot com  2004-02-25 19:33 -------
Subject:  [3.4/3.5 Regression]Incorrect interface method called when compiling against .class files

daney at gcc dot gnu dot org writes:
 > 
 > ------- Additional Comments From daney at gcc dot gnu dot org  2004-02-25 00:35 -------
 > I sent private e-mail, but I thought I would put the same thing here...
 > 
 > Sorry, with the patch, I cannot build libgcj.
 > 
 > I get these errors:

Oh dear.  Sorry.  

Try this one:

2004-02-23  Andrew Haley  <aph@redhat.com>

	* class.c (layout_class_methods): Check for CLASS_INTERFACE as
	well as CLASS_ABSTRACT.

Index: gcc/java/class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.176
diff -p -2 -c -r1.176 class.c
*** gcc/java/class.c	15 Jan 2004 10:24:25 -0000	1.176
--- gcc/java/class.c	25 Feb 2004 19:31:00 -0000
*************** layout_class_methods (tree this_class)
*** 2054,2058 ****
  {
    tree method_decl, dtable_count;
!   tree super_class;
  
    if (TYPE_NVIRTUALS (this_class))
--- 2054,2058 ----
  {
    tree method_decl, dtable_count;
!   tree super_class, type_name;
  
    if (TYPE_NVIRTUALS (this_class))
*************** layout_class_methods (tree this_class)
*** 2071,2075 ****
      dtable_count = integer_zero_node;
  
!   if (CLASS_ABSTRACT (TYPE_NAME (this_class)))
      {
        /* An abstract class can have methods which are declared only in
--- 2071,2076 ----
      dtable_count = integer_zero_node;
  
!   type_name = TYPE_NAME (this_class);
!   if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name))
      {
        /* An abstract class can have methods which are declared only in
Index: gcc/java/parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.464.4.1
diff -p -2 -c -r1.464.4.1 parse.y
*** gcc/java/parse.y	27 Jan 2004 17:27:39 -0000	1.464.4.1
--- gcc/java/parse.y	25 Feb 2004 19:31:04 -0000
*************** check_interface_throws_clauses (tree che
*** 6525,6529 ****
  		 clauses is fine in the absence of a concrete
  		 implementation.  */
! 	      if (method != NULL_TREE && !METHOD_ABSTRACT (method))
  		{
  		  tree method_wfl = DECL_FUNCTION_WFL (method);
--- 6525,6530 ----
  		 clauses is fine in the absence of a concrete
  		 implementation.  */
! 	      if (method != NULL_TREE && !METHOD_ABSTRACT (method)
! 		  && !METHOD_INVISIBLE (iface_method))
  		{
  		  tree method_wfl = DECL_FUNCTION_WFL (method);


-- 


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


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