This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj bug (with -C ?)
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: tromey at redhat dot com
- Cc: Java Discuss List <java at gcc dot gnu dot org>
- Date: Mon, 10 Dec 2001 15:31:02 +1300
- Subject: Re: gcj bug (with -C ?)
- References: <87itbf6g8g.fsf@creche.redhat.com>
Tom Tromey wrote:
>Compile this class with `gcj -C':
>
> public class t {
> public static int x;
>
> static {
> x = 72;
> }
>
> public static void main (String[] args)
> {
> System.out.println (x);
> }
> }
>
>Now run `jcf-dump -c' on the output.
>Note that there is no <clinit> method.
>I think this must be a regression.
>
maybe_yank_clinit()?
@@ -7860,7 +7865,7 @@
bbody = BLOCK_EXPR_BODY (bbody);
else
return 0;
- if (bbody && ! flag_emit_class_files && bbody != empty_stmt_node)
+ if (bbody && bbody != empty_stmt_node)
return 0;
type = DECL_CONTEXT (mdecl);
This patch seems to fix it, though the comment above it suggests that it
isn't correct. I don't know why:
/* If the body isn't empty, then we keep <clinit>. Note that if
we're emitting classfiles, this isn't enough not to rule it
out. */
regards
Bryce.