diff options
author | Per Bothner <per@bothner.com> | 2004-07-07 19:47:08 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 2004-07-07 19:47:08 -0700 |
commit | 5c121a1b6828a7f3c77f8b5ef4da223b27421517 (patch) | |
tree | 2c96cceacebfc41ac8d83b7d52d64f0087f65914 /gcc | |
parent | 50c0d3fde02a62bb75fb52d84e6b669feec2ed3a (diff) | |
download | gcc-5c121a1b6828a7f3c77f8b5ef4da223b27421517.zip gcc-5c121a1b6828a7f3c77f8b5ef4da223b27421517.tar.gz gcc-5c121a1b6828a7f3c77f8b5ef4da223b27421517.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/java/class.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 01c337c..b805bf2 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,8 @@ 2004-07-07 Per Bothner <per@bothner.com> + * 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 48f6b86..5e7c2b9 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)); } } |