From: Per Bothner Date: Thu, 8 Jul 2004 02:47:08 +0000 (-0700) Subject: class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we get internal error... X-Git-Tag: releases/gcc-4.0.0~6946 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c121a1b6828a7f3c77f8b5ef4da223b27421517;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 01c337cf8d02..b805bf2bda61 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 48f6b8609cab..5e7c2b9422b6 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)); } }