From 5c121a1b6828a7f3c77f8b5ef4da223b27421517 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Wed, 7 Jul 2004 19:47:08 -0700 Subject: [PATCH] class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we get internal error due to mismatched types. * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we get internal error due to mismatched types. From-SVN: r84256 --- gcc/java/ChangeLog | 3 +++ gcc/java/class.c | 1 + 2 files changed, 4 insertions(+) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 01c337cf8d0..b805bf2bda6 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,8 @@ 2004-07-07 Per Bothner + * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we + get internal error due to mismatched types. + * gcj.texi (Invoking gij): Document new -verbose:class flag. * gcj.texi (Linking): New node. Document -lgij usage. diff --git a/gcc/java/class.c b/gcc/java/class.c index 48f6b8609ca..5e7c2b9422b 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1126,6 +1126,7 @@ build_static_field_ref (tree fdecl) ref = build (COMPONENT_REF, ptr_type_node, ref, TREE_CHAIN (TYPE_FIELDS (field_info_union_node)), NULL_TREE); + ref = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (fdecl)), ref); return fold (build1 (INDIRECT_REF, TREE_TYPE(fdecl), ref)); } } -- 2.30.2