diff options
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 47ae336..b9848d3 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -549,9 +549,11 @@ inherits_from_p (tree type1, tree type2) { if (type1 == type2) return 1; + if (! CLASS_LOADED_P (type1)) load_class (type1, 1); - type1 = CLASSTYPE_SUPER (type1); + + type1 = maybe_layout_super_class (CLASSTYPE_SUPER (type1), type1); } return 0; } @@ -2058,7 +2060,9 @@ push_super_field (tree this_class, tree super_class) static tree maybe_layout_super_class (tree super_class, tree this_class) { - if (TREE_CODE (super_class) == RECORD_TYPE) + if (!super_class) + return NULL_TREE; + else if (TREE_CODE (super_class) == RECORD_TYPE) { if (!CLASS_LOADED_P (super_class) && CLASS_FROM_SOURCE_P (super_class)) safe_layout_class (super_class); |