aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/verify-impl.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-05-16 22:06:25 +0000
committerTom Tromey <tromey@gcc.gnu.org>2006-05-16 22:06:25 +0000
commit6420fb778ec87ff9f91d025f6e789ac0fc8b45fb (patch)
tree9c2ad51cc9bba6316ac2f7413b2ea2ca3ca61f2f /gcc/java/verify-impl.c
parent48b06e946e5d0aec8182240117d3c0829162411d (diff)
downloadgcc-6420fb778ec87ff9f91d025f6e789ac0fc8b45fb.zip
gcc-6420fb778ec87ff9f91d025f6e789ac0fc8b45fb.tar.gz
gcc-6420fb778ec87ff9f91d025f6e789ac0fc8b45fb.tar.bz2
verify-impl.c (verify_instructions_0): Special case for Object.<init>.
* verify-impl.c (verify_instructions_0) <op_return>: Special case for Object.<init>. From-SVN: r113830
Diffstat (limited to 'gcc/java/verify-impl.c')
-rw-r--r--gcc/java/verify-impl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/java/verify-impl.c b/gcc/java/verify-impl.c
index fc15407..f672fcf 100644
--- a/gcc/java/verify-impl.c
+++ b/gcc/java/verify-impl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation
+/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation
This file is part of libgcj.
@@ -2887,9 +2887,11 @@ verify_instructions_0 (void)
invalidate_pc ();
break;
case op_return:
- /* We only need to check this when the return type is
- void, because all instance initializers return void. */
- if (this_is_init)
+ /* We only need to check this when the return type is void,
+ because all instance initializers return void. We also
+ need to special-case Object constructors, as they can't
+ call a superclass <init>. */
+ if (this_is_init && vfr->current_class != vfy_object_type ())
state_check_this_initialized (vfr->current_state);
check_return_type (make_type (void_type));
invalidate_pc ();