summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-21 19:15:36 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-21 19:15:36 +0000
commitf330c0dc50e7872a1d2f4faba2435f36755e887f (patch)
treeb3d0be987747d095e465e772a05f7e4f8a491155
parent00f4f25df40d4e2530f3a4c2d41758ae2dfd573b (diff)
downloadppe42-gcc-f330c0dc50e7872a1d2f4faba2435f36755e887f.tar.gz
ppe42-gcc-f330c0dc50e7872a1d2f4faba2435f36755e887f.zip
For PR java/4509:
* parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute CAN_COMPLETE_NORMALLY for the node. * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't generate code for second branch if first branch can't complete normally. (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to the loop head if the loop body can't complete normally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48249 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/parse.y15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 7c50c971a34..b3f383c01f0 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -5232,14 +5232,23 @@ check_inner_circular_reference (source, target)
if (!basetype_vec)
return NULL_TREE;
-
+
for (i = 0; i < TREE_VEC_LENGTH (basetype_vec); i++)
{
- tree su = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i));
+ tree su;
+
+ /* We can end up with a NULL_TREE or an incomplete type here if
+ we are compiling multiple files at once. It's safe to simply
+ ignore these cases. */
+ if (TREE_VEC_ELT (basetype_vec, i) == NULL_TREE)
+ continue;
+ su = BINFO_TYPE (TREE_VEC_ELT (basetype_vec, i));
+ if (INCOMPLETE_TYPE_P (su))
+ continue;
if (inherits_from_p (su, target))
return lookup_cl (TYPE_NAME (su));
-
+
for (ctx = DECL_CONTEXT (TYPE_NAME (su)); ctx; ctx = DECL_CONTEXT (ctx))
{
/* An enclosing context shouldn't be TARGET */
OpenPOWER on IntegriCloud