crash compiling class file in subdir

Alexandre Oliva aoliva@redhat.com
Mon Dec 12 14:00:00 GMT 2005


Given the following testcase:

[aoliva@livre reduced]$ cat test/t.java
package test;
public class t extends u {}
[aoliva@livre reduced]$ cat test/u.java
package test;
public class u { }
[aoliva@livre reduced]$ gcj -C test/t.java
[aoliva@livre reduced]$ gcj -c test/t.class
jc1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

Moving the files out of package test makes the ice go away.

set_source_filename () would not set the decl source location if it
thought the new file name would provide no additional info over what
it already had.  This would leave DECL_SOURCE_LOCATION and
file_start_location with a NULL filename, which would end up causing
the crash.

This patch fixes it.  Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcj-cdtparser-crash.patch
Type: text/x-patch
Size: 844 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20051212/7fc5a944/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


More information about the Java-patches mailing list