This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR java/26858: NullPointerException not generated for large classes...


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]