public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Generate TYPE_STUB_DECLs for Java array types
@ 2006-02-08 14:59 Andrew Haley
  0 siblings, 0 replies; only message in thread
From: Andrew Haley @ 2006-02-08 14:59 UTC (permalink / raw)
  To: java-patches, gcc-patches

We don't generate TYPE_STUB_DECLs for Java array types.  Under some
unusual circumstances this may cause segfaults in debuginfo
generation.  Fixed thusly.  

Java doesn't have typedefs: I presume it's legal simply to set the
TYPE_STUB_DECL for an array type to the TYPE_DECL for that array type.
Setting TYPE_DECL_SUPPRESS_DEBUG on the type decl is just to save
space, as I don't think there's much gdb can do with it.

Andrew.


2006-02-08  Andrew Haley  <aph@redhat.com>

	* typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
	array types.
	
Index: typeck.c
===================================================================
--- typeck.c    (revision 110703)
+++ typeck.c    (working copy)
@@ -385,9 +385,11 @@
     else
       strcpy (suffix, "[]");
     TYPE_NAME (t) 
+      = TYPE_STUB_DECL (t)
       = build_decl (TYPE_DECL,
                    identifier_subst (el_name, "", '.', '.', suffix),
                              t);
+    TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (t)) = true;
   }
 
   set_java_signature (t, sig);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-08 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-08 14:59 Generate TYPE_STUB_DECLs for Java array types Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).