This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PR java/26858: NullPointerException not generated for large classes...
- From: Andrew Haley <aph at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Mon, 3 Apr 2006 15:03:55 +0100
- Subject: Re: PR java/26858: NullPointerException not generated for large classes...
- References: <17452.246.662800.831324@zapata.pink>
This causes an ICE when building some codebases because we generate a
check when we shouldn't. Fixed thusly.
Thanks to MJW for finding this.
Andrew.
2006-04-03 Andrew Haley <aph@redhat.com>
PR java/26858
* expr.c (build_field_ref): Don't check the field offset if
flag_syntax_only.
Index: expr.c
===================================================================
--- expr.c (revision 112638)
+++ expr.c (working copy)
@@ -1696,7 +1696,8 @@
memory may be allocated from any other page, so only field
offsets < pagesize are guaratneed to trap. We also assume
the smallest page size we'll encounter is 4k bytes. */
- if (check && ! flag_check_references && ! flag_indirect_dispatch)
+ if (! flag_syntax_only && check && ! flag_check_references
+ && ! flag_indirect_dispatch)
{
tree field_offset = byte_position (field_decl);
if (! page_size)