This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
PR java/18697 [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
- From: Andrew Haley <aph at redhat dot com>
- To: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 3 Dec 2004 15:46:08 GMT
- Subject: PR java/18697 [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)
Removed some logic that was based on a false premise: DECL_ARTIFICIAL
is irrelevant here.
Andrew.
2004-12-03 Andrew Haley <aph@redhat.com>
PR java/18697
* class.c (layout_class_method): Don't fail to override a method
simply because it has DECL_ARTIFICIAL set.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.217
diff -p -2 -c -r1.217 class.c
*** class.c 27 Nov 2004 20:48:16 -0000 1.217
--- class.c 3 Dec 2004 15:20:44 -0000
*************** layout_class_method (tree this_class, tr
*** 2339,2344 ****
method_sig);
if (super_method != NULL_TREE
! && ! METHOD_DUMMY (super_method)
! && ! DECL_ARTIFICIAL (super_method))
{
method_override = true;
--- 2339,2343 ----
method_sig);
if (super_method != NULL_TREE
! && ! METHOD_DUMMY (super_method))
{
method_override = true;
*************** layout_class_method (tree this_class, tr
*** 2359,2363 ****
set_method_index (method_decl, method_index);
if (method_index == NULL_TREE
! && !CLASS_FROM_SOURCE_P (this_class))
error ("%Jnon-static method '%D' overrides static method",
method_decl, method_decl);
--- 2358,2363 ----
set_method_index (method_decl, method_index);
if (method_index == NULL_TREE
! && !CLASS_FROM_SOURCE_P (this_class)
! && ! DECL_ARTIFICIAL (super_method))
error ("%Jnon-static method '%D' overrides static method",
method_decl, method_decl);