This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcc patch] Re: libgcj build bug
- To: Anthony Green <green at cygnus dot com>
- Subject: [gcc patch] Re: libgcj build bug
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 03 Aug 1999 07:47:12 -0300
- Cc: Richard Emberson <emberson at netintouch dot com>, egcs-bugs at egcs dot cygnus dot com, java-discuss at sourceware dot cygnus dot com, java-patches at sourceware dot cygnus dot com, gcc-patches at gcc dot gnu dot org
- References: <37A5DB02.AC79CED2@netintouch.com> <rlyafuovp3.fsf@fencer.cygnus.com> <orhfmh9x7f.fsf@cupuacu.lsd.dcc.unicamp.br>
On Aug 3, 1999, Alexandre Oliva <oliva@dcc.unicamp.br> wrote:
> On Aug 2, 1999, Anthony Green <green@cygnus.com> wrote:
>> This is a known problem with GCC on x86 solaris. Try finishing up
>> with -g0 instead of -g.
>> There's a configure test in libgcj that is supposed to determine if
>> the bug exists and switch to -g0. I wonder why it isn't working. Do
>> you see the result for the configure test "for g++ -g jboolean bug"?
> Here's a patch for libgcj-2.95:
> BTW, is anybody working on the g++ -g problem?
Well, since nobody replied, I decided to give it a try. Here's a
patch that fixes this particular problem. Ok to install in mainline
and 2.95 branch?
Index: gcc/ChangeLog
from Alexandre Oliva <oliva@dcc.unicamp.br>
* dwarfout.c (fundamental_type_code): Return FT_boolean for
INTEGER_TYPE with precision==1, it's __java_boolean. Fixes
g++.oliva/dwarf2.C.
Index: gcc/dwarfout.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dwarfout.c,v
retrieving revision 1.38
diff -u -r1.38 dwarfout.c
--- gcc/dwarfout.c 1999/07/07 00:16:01 1.38
+++ gcc/dwarfout.c 1999/08/03 10:15:09
@@ -1413,6 +1413,10 @@
if (TYPE_PRECISION (type) == CHAR_TYPE_SIZE)
return (TREE_UNSIGNED (type) ? FT_unsigned_char : FT_char);
+ /* In C++, __java_boolean is an INTEGER_TYPE with precision == 1 */
+ if (TYPE_PRECISION (type) == 1)
+ return FT_boolean;
+
abort ();
case REAL_TYPE:
Index: gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C
===================================================================
RCS file: dwarf2.C
diff -N dwarf2.C
--- gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C Sat Dec 5 20:30:03 1998
+++ gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C Tue Aug 3 03:15:43 1999
@@ -0,0 +1,12 @@
+// Build don't link:
+
+// Copyright (C) 1999 Free Software Foundation
+
+// by Alexandre Oliva <oliva@dcc.unicamp.br>
+
+// This used to crash with -gdwarf
+
+// crash test
+
+typedef __java_boolean jboolean;
+void foo() {}
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them