gcj doesn't seem to support -fprofile-arcs: gcj -fprofile-arcs -ftest-coverage -g --main=test test.java test.java: Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. Release: gcj 3.2 Environment: redhat 7.3 linux x86 (2.4.18) smp How-To-Repeat: gcj -fprofile-arcs -ftest-coverage -g --main=test test.java
Fix: none
From: Jeff Sturm <jsturm@one-point.com> To: owen@schwartz-omalley.com Cc: gcc-gnats@gcc.gnu.org, <gcc-prs@gcc.gnu.org>, <gcc-bugs@gcc.gnu.org>, <java-prs@gcc.gnu.org> Subject: Re: java/8260: gcj -fprofile-arcs -ftest-coverage doesn't work Date: Thu, 17 Oct 2002 15:42:02 -0400 (EDT) On 17 Oct 2002 owen@schwartz-omalley.com wrote: > gcj doesn't seem to support -fprofile-arcs: > > gcj -fprofile-arcs -ftest-coverage -g --main=test test.java > test.java: > Internal compiler error: Error reporting routines re-entered. > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. -fprofile-arcs is broken because the gcj frontend doesn't initialize long_integer_type_node. I've been using the following workaround, but haven't submitted since I'm not sure it's the right thing to do. (I.e. is int_type_node or long_type_node the correct size for it? These are java types, not C types.) Index: decl.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v retrieving revision 1.132 diff -u -r1.132 decl.c --- decl.c 21 Sep 2002 02:19:44 -0000 1.132 +++ decl.c 17 Oct 2002 19:36:43 -0000 @@ -426,7 +426,7 @@ pushdecl (build_decl (TYPE_DECL, get_identifier ("byte"), byte_type_node)); short_type_node = make_signed_type (16); pushdecl (build_decl (TYPE_DECL, get_identifier ("short"), short_type_node)); - int_type_node = make_signed_type (32); + long_integer_type_node = int_type_node = make_signed_type (32); pushdecl (build_decl (TYPE_DECL, get_identifier ("int"), int_type_node)); long_type_node = make_signed_type (64); pushdecl (build_decl (TYPE_DECL, get_identifier ("long"), long_type_node));
confirmed on mainline (20030524).
*** Bug 10987 has been marked as a duplicate of this bug. ***
I changed the title because it really only -fprofile-arcs that is causing the problem.
Reconfirmed, this was discused on the mailing list recently (but I cannot find the reference), basically the java front-end is not setting up some of the types right so Jeff's comments are not quite right.
(In reply to comment #6) > Reconfirmed, this was discused on the mailing list recently (but I cannot find the > reference), basically the java front-end is not setting up some of the types right so Jeff's > comments are not quite right. Andrew, you probably mean the discussion following http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01913.html. I think my original patch has the right idea, defining the missing (C) types, but the discussion linked above debated whether java should be using build_common_tree_nodes (I think it should, along with some variable renaming).
Patch posted: http://gcc.gnu.org/ml/gcc-patches/2006-02/msg02043.html
Subject: Bug 8260 Author: aoliva Date: Thu May 4 02:02:01 2006 New Revision: 113512 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113512 Log: PR java/8260 * coverage.c: Use get_gcov_unsigned_t() instead of unsigned_type_node all over. Modified: trunk/gcc/ChangeLog trunk/gcc/coverage.c
Fixed for 4.2.