diff options
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 6cb3dfc..e7f72ae 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1655,7 +1655,8 @@ layout_class_method (this_class, super_class, method_decl, dtable_count) if (super_method != NULL_TREE && ! METHOD_PRIVATE (super_method)) { DECL_VINDEX (method_decl) = DECL_VINDEX (super_method); - if (DECL_VINDEX (method_decl) == NULL_TREE) + if (DECL_VINDEX (method_decl) == NULL_TREE + && !CLASS_FROM_SOURCE_P (this_class)) error_with_decl (method_decl, "non-static method '%s' overrides static method"); #if 0 |