From 055adbaa1e397cd584fedb5cbe1a71651a7a0232 Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Fri, 16 Feb 2001 14:31:52 -0800 Subject: [PATCH] expr.c (build_instanceof): Check for arrays when trying fold to false. 2001-02-15 Alexandre Petit-Bianco * expr.c (build_instanceof): Check for arrays when trying fold to false. (http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00993.html) From-SVN: r39778 --- gcc/java/ChangeLog | 15 ++++++++++----- gcc/java/expr.c | 4 +++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 92a48cdcaf1..848fd7ce197 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2001-02-15 Alexandre Petit-Bianco + + * expr.c (build_instanceof): Check for arrays when trying fold to + false. + 2001-02-15 Jim Meyering * Make-lang.in (java.install-common): Depend on `installdirs'. @@ -10,12 +15,12 @@ 2001-02-14 Tom Tromey Alexandre Petit-Bianco - Fix for PR java/1261. - * typeck.c (build_java_array_type): Add public `clone' method to - arrays. - * parse.y (resolve_qualified_expression_name): Use current_class + Fix for PR java/1261. + * typeck.c (build_java_array_type): Add public `clone' method to + arrays. + * parse.y (resolve_qualified_expression_name): Use current_class when checking for inaccessibility. - (patch_method_invocation): Fixed error message when accessibility + (patch_method_invocation): Fixed error message when accessibility denied. Added `from_super' argument. 2001-02-14 Alexandre Petit-Bianco diff --git a/gcc/java/expr.c b/gcc/java/expr.c index 70a2fe91276..4f7c0dc6a86 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -1157,7 +1157,9 @@ build_instanceof (value, type) value, boolean_true_node, boolean_false_node); } - else if (DECL_P (klass) && DECL_P (valclass) + else if (! TYPE_ARRAY_P (type) + && ! TYPE_ARRAY_P (valtype) + && DECL_P (klass) && DECL_P (valclass) && ! CLASS_INTERFACE (valclass) && ! CLASS_INTERFACE (klass) && ! inherits_from_p (type, valtype) -- 2.30.2