public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Reduce Dwarf Debug Size
@ 2007-02-27 20:51 Lawrence Crowl
  2007-02-27 20:59 ` Andrew Pinski
                   ` (4 more replies)
  0 siblings, 5 replies; 61+ messages in thread
From: Lawrence Crowl @ 2007-02-27 20:51 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 4265 bytes --]

A major contribution to object and executable size is DWARF debug
information size.  A major contribution to debug information
size is struct descriptions replicated in several object files.
This patch adds an option to reduce the size of this information,
which mainly benefits C++.

The basic idea is to not emit struct debugging information in the
current compilation unit when that information will be generated
by another compilation unit.  The primary criteria is whether the
base name of the file containing the struct definition matches the
base name of the main file being compiled.  For example, if struct
foo is defined in bar.h, then when used in bar.c, the compiler will
generate the struct debugging information.  On the other hand, when
used in ping.c, the compiler will not generate the information.
This simple approach is complicated by templates, system headers,
indirect use of structs, etc.

Because there is less information, there is a chance that debugging
may be impaired.  Therefore, the compiler's default behavior is
unchanged and the option has a value that enables you to chose the
size versus debuggibility, that is, to choose the criteria by which
struct debugging information will be emitted.  The most important
choices are as follows.

   By default, the compiler's and debugger's behavior does not
   change.

   With -g -gstruct, the compiler conservatively suppresses some
   struct debug information.  Debugging behavior should be mostly
   unimpaired, except perhaps for interactions with non-system
   libraries built without -g.

   With -g -gstruct=base, the compiler emits struct information
   on strictly matching file base names.  Debugging templates or
   structs defined in system headers will be impaired.

Experimentally, the size savings can be significant.  On one very
large application, the sizes were:

  debug executable
   size   size
   100%   100%   with only -g
    60%    73%   with -g -gstruct
    37%    58%   with -g -gstruct=base

The -gstruct option documentation in texinfo is:

   -gstruct[=spec-list]
      Specify the struct-like types for which the compiler will
      generate debug information.  The intent is to reduce duplicate
      struct debug information between different object files within
      the same program.

      A specification has the syntax
      [dir:|ind:][ord:|gen:](any|sys|base|none)

      The optional first word limits the specification to structs
      that are used directly (dir:) or used indirectly (ind:).
      A struct type is used directly when it is the type of a
      variable, member.  Indirect uses arise through pointers to
      structs.  That is, when use of an incomplete struct would be
      legal, the use is indirect.  An example is struct one direct;
      struct two * indirect;.

      The optional second word limits the specification to ordinary
      structs (ord:) or generic structs (gen:).  Generic structs are
      a bit complicated to explain.  For C++, these are non-explicit
      specializations of template classes, or non-template classes
      within the above.  Other programming languages have generics,
      but -gstruct does not yet implement them.

      The third word specifies the source files for those structs for
      which the compiler will emit debug information.  The values
      none and any have the normal meaning.  The value base means
      that the base of name of the file in which the type declaration
      appears must match the base of the name of the main compilation
      file.  In practice, this means that types declared in foo.c
      and foo.h will have debug information, but types declared
      in other header will not.  The value sys means those types
      satisfying base or declared in system or compiler headers.

      By default, the compiler emits debug information
      for any struct.  When -gstruct is present without any
      specification, i.e. without the = sign, the specification
      is dir:ord:sys,dir:gen:any,ind:base, which should provide
      reasonably good debuggability with significant size reduction.
      You may need to experiment to determine the best settings
      for your application.

      This option works only with DWARF.

-- 
Lawrence Crowl

[-- Attachment #2: gcc-gstruct-compiler-changelog.txt --]
[-- Type: text/plain, Size: 1922 bytes --]

2007-02-20  Lawrence Crowl  <crowl@google.com>

	* doc/invoke.texi (Debugging Options): Add documentation
	for -gstruct[=...].

	* c-opts.c (c_common_handle_option): Add OPT_gstruct[_].
	* c.opt: Add specifications for -gstruct and -gstruct=.
	* opts.c (set_struct_debug_option): Parse the -gstruct
	option.
	* opts.c (matches_main_base): Add variables
	(main_input_basename, main_input_baselength) and functions
	(base_of_path, matches_main_base) to compare header base
	name to compilation unit base name.
	* opts.c (should_emit_struct_debug): Add a function
	(should_emit_struct_debug) to determine to emit a structure
	based on the option.  Also add a disabled function
	(dump_struct_debug) to debug this function.
	* opts.c (handle_options): Save the base name of the
	compilation unit.

	* langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add
	LANG_HOOKS_GENERIC_TYPE_P.

	type is generic.  Set it by default to "never generic".
	* langhooks.h (struct lang_hooks_for_types): Add a new hook
	to determine if a struct type is generic or not.
	* cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
	* cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
	* cp/cp-lang.c: Override null C hook with live C++ hook.

	* flags.h: Add an enumeration to describe a program's use
	of a structure type.
	* dwarf2out.c (gen_struct_or_union_type_die): Add a new
	parameter to indicate the program's usage of the type.
	Filter structs based on the -gstruct specification.
	(gen_type_die): Split into two routines, gen_type_die and
	gen_type_die_with_usage.  gen_type_die is now a wrapper
	that assumes direct usage.
	(gen_type_die_with_usage): Replace calls to gen_type_die
	with gen_type_die_with_usage adding the program usage of
	the referenced type.
	(dwarf2out_imported_module_or_decl): Suppress struct debug
	information using should_emit_struct_debug when appropriate.

[-- Attachment #3: gcc-gstruct-testsuite-changelog.txt --]
[-- Type: text/plain, Size: 1098 bytes --]

2007-02-20  Lawrence Crowl  <crowl@google.com>

	* g++.dg/other/gstruct-any.C: Test -gstruct=any.
	* g++.dg/other/gstruct-any.h: Test -gstruct=any.
	* g++.dg/other/gstruct-base.C: Test -gstruct=base.
	* g++.dg/other/gstruct-base.h: Test -gstruct=base.
	* g++.dg/other/gstruct-none.C: Test -gstruct=none.
	* g++.dg/other/gstruct-none.h: Test -gstruct=none.
	* g++.dg/other/gstruct-plain.C: Test -gstruct.
	* g++.dg/other/gstruct-plain.h: Test -gstruct.
	* g++.dg/other/gstruct-sys.C: Test -gstruct=sys.
	* g++.dg/other/gstruct-sys.h: Test -gstruct=sys.
	* g++.dg/other/gstruct.h: Common to -gstruct tests.

	* gcc.dg/gstruct-any.c: Test -gstruct=any.
	* gcc.dg/gstruct-any.h: Test -gstruct=any.
	* gcc.dg/gstruct-base.c: Test -gstruct=base.
	* gcc.dg/gstruct-base.h: Test -gstruct=base.
	* gcc.dg/gstruct-none.c: Test -gstruct=none.
	* gcc.dg/gstruct-none.h: Test -gstruct=none.
	* gcc.dg/gstruct-plain.c: Test -gstruct.
	* gcc.dg/gstruct-plain.h: Test -gstruct.
	* gcc.dg/gstruct-sys.c: Test -gstruct=sys.
	* gcc.dg/gstruct-sys.h: Test -gstruct=sys.
	* gcc.dg/gstruct.h: Common to -gstruct tests.


[-- Attachment #4: gcc-gstruct.patch --]
[-- Type: text/x-patch, Size: 117166 bytes --]

==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c#11 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c#11	2007-02-20 11:09:09.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c	2007-02-16 14:55:59.000000000 -0800
@@ -823,6 +823,14 @@
       flag_gen_declaration = 1;
       break;
 
+    case OPT_gstruct:
+      set_struct_debug_option ("dir:ord:sys,dir:gen:any,ind:base");
+      break;
+
+    case OPT_gstruct_:
+      set_struct_debug_option (arg);
+      break;
+
     case OPT_idirafter:
       add_path (xstrdup (arg), AFTER, 0, true);
       break;
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt#11 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt#11	2007-02-20 11:09:09.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt	2007-02-16 16:28:12.000000000 -0800
@@ -775,6 +775,14 @@
 ObjC ObjC++
 Dump declarations to a .decl file
 
+gstruct
+C ObjC C++ ObjC++
+-gstruct	Reduced debug info for structs
+
+gstruct=
+C ObjC C++ ObjC++ Joined
+-gstruct=<spec-list>	Controlled reduced debug info for structs
+
 idirafter
 C ObjC C++ ObjC++ Joined Separate
 -idirafter <dir>	Add <dir> to the end of the system include path
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c#2 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c#2	2007-02-20 11:09:09.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c	2007-02-02 17:40:31.000000000 -0800
@@ -44,6 +44,8 @@
 #define LANG_HOOKS_NAME "GNU C++"
 #undef LANG_HOOKS_INIT
 #define LANG_HOOKS_INIT cxx_init
+#undef LANG_HOOKS_GENERIC_TYPE_P
+#define LANG_HOOKS_GENERIC_TYPE_P class_tmpl_impl_spec_p
 #undef LANG_HOOKS_DECL_PRINTABLE_NAME
 #define LANG_HOOKS_DECL_PRINTABLE_NAME	cxx_printable_name
 #undef LANG_HOOKS_FOLD_OBJ_TYPE_REF
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h#11 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h#11	2007-02-20 11:09:09.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h	2007-02-02 17:40:31.000000000 -0800
@@ -4384,6 +4384,7 @@
 extern tree cxx_maybe_build_cleanup		(tree);
 extern void init_tree				(void);
 extern int pod_type_p				(tree);
+extern bool class_tmpl_impl_spec_p		(tree);
 extern int zero_init_p				(tree);
 extern tree canonical_type_variant		(tree);
 extern tree copy_binfo				(tree, tree, tree,
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c#3	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c	2007-02-02 17:40:31.000000000 -0800
@@ -1904,6 +1904,14 @@
   return 1;
 }
 
+/* Nonzero iff type T is a class template implicit specialization.  */
+
+bool
+class_tmpl_impl_spec_p (tree t)
+{
+  return CLASS_TYPE_P (t) && CLASSTYPE_TEMPLATE_INSTANTIATION (t);
+}
+
 /* Returns 1 iff zero initialization of type T means actually storing
    zeros in it.  */
 
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi#39 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi#39	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi	2007-02-16 15:02:11.000000000 -0800
@@ -297,6 +297,7 @@
 -ftest-coverage  -ftime-report -fvar-tracking @gol
 -g  -g@var{level}  -gcoff -gdwarf-2 @gol
 -ggdb  -gstabs  -gstabs+  -gvms  -gxcoff  -gxcoff+ @gol
+-gstruct@r{[}=@var{spec-list}@r{]} @gol
 -p  -pg  -print-file-name=@var{library}  -print-libgcc-file-name @gol
 -print-multi-directory  -print-multi-lib @gol
 -print-prog-name=@var{program}  -print-search-dirs  -Q @gol
@@ -3754,6 +3755,54 @@
 information about each symbol.  This option only makes sense when
 generating DWARF2 debugging information with @option{-gdwarf-2}.
 
+@item -gstruct@r{[}=@var{spec-list}@r{]}
+Specify the struct-like types
+for which the compiler will generate debug information.
+The intent is to reduce duplicate struct debug information
+between different object files within the same program.
+
+A specification has the syntax
+[@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none})
+
+The optional first word limits the specification to
+structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}).
+A struct type is used directly when it is the type of a variable, member.
+Indirect uses arise through pointers to structs.
+That is, when use of an incomplete struct would be legal, the use is indirect.
+An example is
+@samp{struct one direct; struct two * indirect;}.
+
+The optional second word limits the specification to
+ordinary structs (@samp{ord:}) or generic structs (@samp{gen:}).
+Generic structs are a bit complicated to explain.
+For C++, these are non-explicit specializations of template classes,
+or non-template classes within the above.
+Other programming languages have generics,
+but @samp{-gstruct} does not yet implement them.
+
+The third word specifies the source files for those
+structs for which the compiler will emit debug information.
+The values @samp{none} and @samp{any} have the normal meaning.
+The value @samp{base} means that
+the base of name of the file in which the type declaration appears
+must match the base of the name of the main compilation file.
+In practice, this means that
+types declared in @file{foo.c} and @file{foo.h} will have debug information,
+but types declared in other header will not.
+The value @samp{sys} means those types satisfying @samp{base}
+or declared in system or compiler headers.
+
+By default, the compiler emits debug information for any struct.
+When @samp{-gstruct} is present without any specification,
+i.e. without the @samp{=} sign,
+the specification is @samp{dir:ord:sys,dir:gen:any,ind:base},
+which should provide reasonably good debuggability
+with significant size reduction.
+You may need to experiment to determine the best settings
+for your application.
+
+This option works only with DWARF.
+
 @cindex @command{prof}
 @item -p
 @opindex p
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c#12 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c#12	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c	2007-02-20 11:13:32.000000000 -0800
@@ -4214,7 +4214,8 @@
 static dw_die_ref gen_compile_unit_die (const char *);
 static void gen_inheritance_die (tree, tree, dw_die_ref);
 static void gen_member_die (tree, dw_die_ref);
-static void gen_struct_or_union_type_die (tree, dw_die_ref);
+static void gen_struct_or_union_type_die (tree, dw_die_ref,
+						enum debug_info_usage);
 static void gen_subroutine_type_die (tree, dw_die_ref);
 static void gen_typedef_die (tree, dw_die_ref);
 static void gen_type_die (tree, dw_die_ref);
@@ -12501,7 +12502,8 @@
    member DIEs needed by later specification DIEs.  */
 
 static void
-gen_struct_or_union_type_die (tree type, dw_die_ref context_die)
+gen_struct_or_union_type_die (tree type, dw_die_ref context_die,
+				enum debug_info_usage usage)
 {
   dw_die_ref type_die = lookup_type_die (type);
   dw_die_ref scope_die = 0;
@@ -12510,6 +12512,7 @@
 		  && (! TYPE_STUB_DECL (type)
 		      || ! TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type))));
   int ns_decl = (context_die && context_die->die_tag == DW_TAG_namespace);
+  complete = complete && should_emit_struct_debug (type, usage);
 
   if (type_die && ! complete)
     return;
@@ -12646,7 +12649,8 @@
 /* Generate a type description DIE.  */
 
 static void
-gen_type_die (tree type, dw_die_ref context_die)
+gen_type_die_with_usage (tree type, dw_die_ref context_die,
+				enum debug_info_usage usage)
 {
   int need_pop;
 
@@ -12694,16 +12698,19 @@
 
       /* For these types, all that is required is that we output a DIE (or a
 	 set of DIEs) to represent the "basis" type.  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+				DINFO_USAGE_IND_USE);
       break;
 
     case OFFSET_TYPE:
       /* This code is used for C++ pointer-to-data-member types.
 	 Output a description of the relevant class type.  */
-      gen_type_die (TYPE_OFFSET_BASETYPE (type), context_die);
+      gen_type_die_with_usage (TYPE_OFFSET_BASETYPE (type), context_die,
+					DINFO_USAGE_IND_USE);
 
       /* Output a description of the type of the object pointed to.  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+					DINFO_USAGE_IND_USE);
 
       /* Now output a DIE to represent this pointer-to-data-member type
 	 itself.  */
@@ -12712,13 +12719,15 @@
 
     case FUNCTION_TYPE:
       /* Force out return type (in case it wasn't forced out already).  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+					DINFO_USAGE_DIR_USE);
       gen_subroutine_type_die (type, context_die);
       break;
 
     case METHOD_TYPE:
       /* Force out return type (in case it wasn't forced out already).  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+					DINFO_USAGE_DIR_USE);
       gen_subroutine_type_die (type, context_die);
       break;
 
@@ -12744,7 +12753,7 @@
 	  && AGGREGATE_TYPE_P (TYPE_CONTEXT (type))
 	  && ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type)))
 	{
-	  gen_type_die (TYPE_CONTEXT (type), context_die);
+	  gen_type_die_with_usage (TYPE_CONTEXT (type), context_die, usage);
 
 	  if (TREE_ASM_WRITTEN (type))
 	    return;
@@ -12768,7 +12777,7 @@
 	    gen_enumeration_type_die (type, context_die);
 	}
       else
-	gen_struct_or_union_type_die (type, context_die);
+	gen_struct_or_union_type_die (type, context_die, usage);
 
       if (need_pop)
 	pop_decl_scope ();
@@ -12797,6 +12806,12 @@
   TREE_ASM_WRITTEN (type) = 1;
 }
 
+static void
+gen_type_die (tree type, dw_die_ref context_die)
+{
+  gen_type_die_with_usage (type, context_die, DINFO_USAGE_DIR_USE);
+}
+
 /* Generate a DIE for a tagged type instantiation.  */
 
 static void
@@ -13392,7 +13407,11 @@
   if (!context)
     scope_die = comp_unit_die;
   else if (TYPE_P (context))
+    {
+      if (!should_emit_struct_debug (context, DINFO_USAGE_DIR_USE))
+	return;
     scope_die = force_type_die (context);
+    }
   else
     scope_die = force_decl_die (context);
 
@@ -13413,7 +13432,12 @@
 
 	      if (TYPE_CONTEXT (type))
 		if (TYPE_P (TYPE_CONTEXT (type)))
+		  {
+		    if (!should_emit_struct_debug (TYPE_CONTEXT (type),
+						   DINFO_USAGE_DIR_USE))
+		      return;
 		  type_context_die = force_type_die (TYPE_CONTEXT (type));
+		  }
 	      else
 		type_context_die = force_decl_die (TYPE_CONTEXT (type));
 	      else
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h#3	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h	2007-02-05 13:20:48.000000000 -0800
@@ -23,6 +23,7 @@
 #ifndef GCC_FLAGS_H
 #define GCC_FLAGS_H
 
+#include "coretypes.h"
 #include "options.h"
 
 enum debug_info_type
@@ -54,6 +55,25 @@
 /* Specify how much debugging info to generate.  */
 extern enum debug_info_level debug_info_level;
 
+/* A major contribution to object and executable size is debug
+   information size.  A major contribution to debug information
+   size is struct descriptions replicated in several object files.
+   The following function determines whether or not debug information
+   should be generated for a given struct.  The indirect parameter
+   indicates that the struct is being handled indirectly, via
+   a pointer.  See opts.c for the implementation. */
+
+enum debug_info_usage
+{
+  DINFO_USAGE_DFN,	/* A struct definition. */
+  DINFO_USAGE_DIR_USE,	/* A direct use, such as the type of a variable. */
+  DINFO_USAGE_IND_USE,	/* An indirect use, such as through a pointer. */
+  DINFO_USAGE_NUM_ENUMS	/* The number of enumerators. */
+};
+
+extern bool should_emit_struct_debug (tree type_decl, enum debug_info_usage);
+extern void set_struct_debug_option (const char *value);
+
 /* Nonzero means use GNU-only extensions in the generated symbolic
    debugging information.  */
 extern bool use_gnu_debug_info_extensions;
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h#3	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h	2007-02-02 17:40:31.000000000 -0800
@@ -216,6 +216,7 @@
    so we create a compile-time error instead.  */
 #define LANG_HOOKS_MAKE_TYPE lhd_make_node
 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
+#define LANG_HOOKS_GENERIC_TYPE_P	hook_bool_tree_false
 #define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
 #define LANG_HOOKS_TYPE_MAX_SIZE	lhd_return_null_tree
@@ -230,6 +231,7 @@
   LANG_HOOKS_UNSIGNED_TYPE, \
   LANG_HOOKS_SIGNED_TYPE, \
   LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, \
+  LANG_HOOKS_GENERIC_TYPE_P, \
   LANG_HOOKS_TYPE_PROMOTES_TO, \
   LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
   LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h#3	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h	2007-02-02 17:40:31.000000000 -0800
@@ -119,6 +119,10 @@
      according to UNSIGNEDP.  */
   tree (*signed_or_unsigned_type) (int, tree);
 
+  /* True if the type is an instantiation of a generic type,
+     e.g. C++ template implicit specializations.  */
+  bool (*generic_p) (tree);
+
   /* Given a type, apply default promotions to unnamed function
      arguments and return the new type.  Return the same type if no
      change.  Required by any language that supports variadic
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c#8 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c#8	2007-02-20 11:09:10.000000000 -0800
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c	2007-02-02 17:40:31.000000000 -0800
@@ -73,6 +73,251 @@
    the definitions of the different possible levels.  */
 enum debug_info_level debug_info_level = DINFO_LEVEL_NONE;
 
+/* A major contribution to object and executable size is debug
+   information size.  A major contribution to debug information size
+   is struct descriptions replicated in several object files. The
+   following flags attempt to reduce this information.  The basic
+   idea is to not emit struct debugging information in the current
+   compilation unit when that information will be generated by
+   another compilation unit.
+
+   Debug information for a struct defined in the current source
+   file should be generated in the object file.  Likewise the
+   debug information for a struct defined in a header should be
+   generated in the object file of the corresponding source file.
+   Both of these case are handled when the base name of the file of
+   the struct definition matches the base name of the source file
+   of thet current compilation unit.  This matching emits minimal
+   struct debugging information.
+
+   The base file name matching rule above will fail to emit debug
+   information for structs defined in system headers.  So a second
+   category of files includes system headers in addition to files
+   with matching bases.
+
+   The remaining types of files are library headers and application
+   headers.  We cannot currently distinguish these two types.  */
+
+enum debug_struct_file
+{
+  DINFO_STRUCT_FILE_NONE,   /* Debug no structs. */
+  DINFO_STRUCT_FILE_BASE,   /* Debug structs defined in files with the
+                               same base name as the compilation unit. */
+  DINFO_STRUCT_FILE_SYS,    /* Also debug structs defined in system
+                               header files.  */
+  DINFO_STRUCT_FILE_ANY     /* Debug structs defined in all files. */
+};
+
+/* Generic structs (e.g. templates not explicitly specialized)
+   may not have a compilation unit associated with them, and so
+   may need to be treated differently from ordinary structs.
+
+   Structs only handled by reference (indirectly), will also usually
+   not need as much debugging information.  */
+
+static enum debug_struct_file gstruct_ordinary[DINFO_USAGE_NUM_ENUMS]
+  = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY };
+static enum debug_struct_file gstruct_generic[DINFO_USAGE_NUM_ENUMS]
+  = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY };
+
+/* Parse the -gstruct option value and set the flag variables. */
+
+#define MATCH( prefix, string ) \
+  ((strncmp (prefix, string, sizeof prefix - 1) == 0) \
+   ? ((string += sizeof prefix - 1), 1) : 0)
+
+void
+set_struct_debug_option (const char *spec)
+{
+  /* various labels for comparison */
+  static char dfn_lbl[] = "dfn:", dir_lbl[] = "dir:", ind_lbl[] = "ind:";
+  static char ord_lbl[] = "ord:", gen_lbl[] = "gen:";
+  static char none_lbl[] = "none", any_lbl[] = "any";
+  static char base_lbl[] = "base", sys_lbl[] = "sys";
+
+  enum debug_struct_file files = DINFO_STRUCT_FILE_ANY;
+  /* Default is to apply to as much as possible. */
+  enum debug_info_usage usage = DINFO_USAGE_NUM_ENUMS;
+  int ord = 1, gen = 1;
+
+  /* What usage? */
+  if (MATCH (dfn_lbl, spec))
+    usage = DINFO_USAGE_DFN;
+  else if (MATCH (dir_lbl, spec))
+    usage = DINFO_USAGE_DIR_USE;
+  else if (MATCH (ind_lbl, spec))
+    usage = DINFO_USAGE_IND_USE;
+
+  /* Generics or not? */
+  if (MATCH (ord_lbl, spec))
+    gen = 0;
+  else if (MATCH (gen_lbl, spec))
+    ord = 0;
+
+  /* What allowable environment? */
+  if (MATCH (none_lbl, spec))
+    files = DINFO_STRUCT_FILE_NONE;
+  else if (MATCH (any_lbl, spec))
+    files = DINFO_STRUCT_FILE_ANY;
+  else if (MATCH (sys_lbl, spec))
+    files = DINFO_STRUCT_FILE_SYS;
+  else if (MATCH (base_lbl, spec))
+    files = DINFO_STRUCT_FILE_BASE;
+  else
+    error ("argument %qs to %<-gstruct%> not recognized", spec);
+
+  /* Effect the specification. */
+  if (usage == DINFO_USAGE_NUM_ENUMS)
+    {
+      if (ord)
+        {
+          gstruct_ordinary[DINFO_USAGE_DFN] = files;
+          gstruct_ordinary[DINFO_USAGE_DIR_USE] = files;
+          gstruct_ordinary[DINFO_USAGE_IND_USE] = files;
+        }
+      if (gen)
+        {
+          gstruct_generic[DINFO_USAGE_DFN] = files;
+          gstruct_generic[DINFO_USAGE_DIR_USE] = files;
+          gstruct_generic[DINFO_USAGE_IND_USE] = files;
+        }
+    }
+  else
+    {
+      if (ord)
+        gstruct_ordinary[usage] = files;
+      if (gen)
+        gstruct_generic[usage] = files;
+    }
+
+  if (*spec == ',')
+    set_struct_debug_option (spec+1);
+  else
+    {
+      /* No more -ggstruct specifications.  Do final checks. */
+      if (*spec != '\0')
+	error ("argument %qs to %<-gstruct%> not recognized", spec);
+      if (gstruct_ordinary[DINFO_USAGE_DIR_USE]
+		< gstruct_ordinary[DINFO_USAGE_IND_USE]
+	  || gstruct_generic[DINFO_USAGE_DIR_USE]
+		< gstruct_generic[DINFO_USAGE_IND_USE])
+	error ("%<-gstruct=dir:...%> must allow at least as much as %<-gstruct=ind:...%>");
+    }
+}
+
+/* Find the base name of a path, stripping off both directories and
+   a single final extension. */
+static int
+base_of_path (const char *path, const char **base_out)
+{
+  const char *base = path;
+  const char *dot = 0;
+  const char *p = path;
+  char c = *p;
+  while (c)
+    {
+      if (IS_DIR_SEPARATOR(c))
+        {
+          base = p + 1;
+          dot = 0;
+        }
+      else if (c == '.')
+        dot = p;
+      c = *++p;
+    }
+  if (!dot)
+    dot = p;
+  *base_out = base;
+  return dot - base;
+}
+
+/* Match the base name of a file to the base name of a compilation unit. */
+
+static const char *main_input_basename;
+static int main_input_baselength;
+
+static int
+matches_main_base (const char *path)
+{
+  /* Cache the last query. */
+  static const char *last_path = NULL;
+  static int last_match = 0;
+  if (path != last_path)
+    {
+      const char *base;
+      int length = base_of_path (path, &base);
+      last_path = path;
+      last_match = (length == main_input_baselength
+                    && memcmp (base, main_input_basename, length) == 0);
+    }
+  return last_match;
+}
+
+#ifdef DEBUG_GSTRUCT
+
+static int
+dump_struct_debug (tree type, enum debug_info_usage usage,
+		   enum debug_struct_file criterion, int generic,
+		   int matches, int result)
+{
+  /* Find the type name. */
+  tree type_decl = TYPE_STUB_DECL (type);
+  tree t = type_decl;
+  const char *name = 0;
+  if (TREE_CODE (t) == TYPE_DECL)
+    t = DECL_NAME (t);
+  if (t)
+    name = IDENTIFIER_POINTER (t);
+
+  fprintf (stderr, "	struct %d %s %s %s %s %d %p %s\n",
+	   criterion,
+           DECL_IN_SYSTEM_HEADER (type_decl) ? "sys" : "usr",
+           matches ? "bas" : "hdr",
+           generic ? "gen" : "ord",
+           usage == DINFO_USAGE_DFN ? ";" :
+             usage == DINFO_USAGE_DIR_USE ? "." : "*",
+           result,
+           (void*) type_decl, name);
+  return result;
+}
+#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result) \
+  dump_struct_debug (type, usage, criterion, generic, matches, result)
+
+#else
+
+#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result) \
+  (result)
+
+#endif
+
+
+bool
+should_emit_struct_debug (tree type, enum debug_info_usage usage)
+{
+  enum debug_struct_file criterion;
+  tree type_decl;
+  bool generic = lang_hooks.types.generic_p (type);
+
+  if (generic)
+    criterion = gstruct_generic[usage];
+  else
+    criterion = gstruct_ordinary[usage];
+
+  if (criterion == DINFO_STRUCT_FILE_NONE)
+    return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
+  if (criterion == DINFO_STRUCT_FILE_ANY)
+    return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
+
+  type_decl = TYPE_STUB_DECL (type);
+
+  if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl))
+    return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
+
+  if (matches_main_base (DECL_SOURCE_FILE (type_decl)))
+    return DUMP_GSTRUCT (type, usage, criterion, generic, true, true);
+  return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
+}
+
 /* Nonzero means use GNU-only extensions in the generated symbolic
    debugging information.  Currently, this only has an effect when
    write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG.  */
@@ -364,7 +609,11 @@
       if (opt[0] != '-' || opt[1] == '\0')
 	{
 	  if (main_input_filename == NULL)
+	    {
 	    main_input_filename = opt;
+	      main_input_baselength
+		= base_of_path (main_input_filename, &main_input_basename);
+	    }
 	  add_input_filename (opt);
 	  n = 1;
 	  continue;
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-any.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-any.C	2007-02-16 14:10:30.000000000 -0800
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=any" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "gstruct-any.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-any.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-any.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-any.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-any.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-any.h	2007-02-16 14:09:08.000000000 -0800
@@ -0,0 +1,42 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-base.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-base.C	2007-02-16 14:13:43.000000000 -0800
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=base" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "gstruct-base.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-base.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-base.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-base.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-base.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-base.h	2007-02-16 14:12:36.000000000 -0800
@@ -0,0 +1,42 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-none.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-none.C	2007-02-16 14:15:11.000000000 -0800
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=none" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "gstruct-none.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-none.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-none.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-none.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-none.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-none.h	2007-02-16 14:12:36.000000000 -0800
@@ -0,0 +1,42 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-plain.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-plain.C	2007-02-16 14:16:21.000000000 -0800
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "gstruct-plain.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-plain.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-plain.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-plain.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-plain.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-plain.h	2007-02-16 14:11:30.000000000 -0800
@@ -0,0 +1,42 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-sys.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-sys.C	2007-02-16 14:17:09.000000000 -0800
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=sys" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "gstruct-sys.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-sys.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-sys.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-sys.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-sys.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct-sys.h	2007-02-16 14:12:36.000000000 -0800
@@ -0,0 +1,42 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/gstruct.h	2007-02-15 18:10:02.000000000 -0800
@@ -0,0 +1,67 @@
+/*
+where from: base = matching base; head = other header
+what kind:  ordy = ordinary struct; tmpl = template struct
+definition: decl = incomplete declaration; defn = full definition
+how used:   not = not used; ref = by ref; ptr = through pointer;
+            fld = as field; var = as variable
+from where: base = from base; head = other header
+*/
+
+struct gstruct_head_ordy_decl_not;
+struct gstruct_head_ordy_defn_not { int field_head_ordy_defn_not; };
+
+struct gstruct_head_ordy_decl_ref_head;
+struct gstruct_head_ordy_defn_ref_head { int field_head_ordy_defn_ref_head; };
+struct gstruct_head_ordy_defn_ptr_head { int field_head_ordy_defn_ptr_head; };
+struct gstruct_head_ordy_defn_fld_head { int field_head_ordy_defn_fld_head; };
+struct gstruct_head_ordy_defn_var_head {
+    gstruct_head_ordy_decl_ref_head *field_head_ordy_defn_var_head_inc;
+    gstruct_head_ordy_defn_ref_head *field_head_ordy_defn_var_head_ref;
+    gstruct_head_ordy_defn_ptr_head *field_head_ordy_defn_var_head_ptr;
+    gstruct_head_ordy_defn_fld_head  field_head_ordy_defn_var_head_fld;
+};
+extern struct gstruct_head_ordy_defn_var_head head_var1;
+
+struct gstruct_head_ordy_decl_ref_base;
+struct gstruct_head_ordy_defn_ref_base { int field_head_ordy_defn_ref_base; };
+struct gstruct_head_ordy_defn_ptr_base { int field_head_ordy_defn_ptr_base; };
+struct gstruct_head_ordy_defn_fld_base { int field_head_ordy_defn_fld_base; };
+struct gstruct_head_ordy_defn_var_base { int field_head_ordy_defn_var_base; };
+
+template< typename T > struct gstruct_head_tmpl_decl_not;
+template< typename T > struct gstruct_head_tmpl_defn_not
+{ T field_head_tmpl_defn_not; };
+
+template< typename T > struct gstruct_head_tmpl_decl_ref_head;
+template< typename T > struct gstruct_head_tmpl_defn_ref_head
+{ T field_head_tmpl_defn_ref_head; };
+template< typename T > struct gstruct_head_tmpl_defn_ptr_head
+{ T field_head_tmpl_defn_ptr_head; };
+template< typename T > struct gstruct_head_tmpl_defn_fld_head
+{ T field_head_tmpl_defn_fld_head; };
+template< typename T > struct gstruct_head_tmpl_defn_var_head {
+    gstruct_head_tmpl_decl_ref_head< T > *field_head_tmpl_defn_var_head_inc;
+    gstruct_head_tmpl_defn_ref_head< T > *field_head_tmpl_defn_var_head_ref;
+    gstruct_head_tmpl_defn_ptr_head< T > *field_head_tmpl_defn_var_head_ptr;
+    gstruct_head_tmpl_defn_fld_head< T >  field_head_tmpl_defn_var_head_fld;
+};
+extern gstruct_head_tmpl_defn_var_head< int > head_var5;
+
+template< typename T > struct gstruct_head_tmpl_decl_ref_base;
+template< typename T > struct gstruct_head_tmpl_defn_ref_base
+{ T field_head_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_head_tmpl_defn_ptr_base
+{ T field_head_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_head_tmpl_defn_fld_base
+{ T field_head_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_head_tmpl_defn_var_base
+{ T field_head_tmpl_defn_var_base; };
+
+inline int head_function() {
+    return 0
++ head_var1.field_head_ordy_defn_var_head_ptr->field_head_ordy_defn_ptr_head
++ head_var1.field_head_ordy_defn_var_head_fld.field_head_ordy_defn_fld_head
++ head_var5.field_head_tmpl_defn_var_head_ptr->field_head_tmpl_defn_ptr_head
++ head_var5.field_head_tmpl_defn_var_head_fld.field_head_tmpl_defn_fld_head
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-any.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-any.c	2007-02-20 10:53:36.000000000 -0800
@@ -0,0 +1,84 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=any" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "gstruct-any.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-any.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-any.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-any.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-any.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-any.h	2007-02-20 10:53:56.000000000 -0800
@@ -0,0 +1,19 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-base.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-base.c	2007-02-20 10:54:13.000000000 -0800
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=base" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "gstruct-base.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-base.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-base.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-base.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-base.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-base.h	2007-02-20 10:54:26.000000000 -0800
@@ -0,0 +1,19 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-none.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-none.c	2007-02-20 10:50:45.000000000 -0800
@@ -0,0 +1,84 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=none" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "gstruct-none.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-none.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-none.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-none.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-none.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-none.h	2007-02-20 10:54:49.000000000 -0800
@@ -0,0 +1,19 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-plain.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-plain.c	2007-02-20 10:55:03.000000000 -0800
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "gstruct-plain.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-plain.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-plain.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-plain.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-plain.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-plain.h	2007-02-20 10:55:13.000000000 -0800
@@ -0,0 +1,19 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-sys.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-sys.c	2007-02-20 10:55:21.000000000 -0800
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -gstruct=sys" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "gstruct-sys.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "gstruct-sys.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "gstruct-sys.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "gstruct-sys.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-sys.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct-sys.h	2007-02-20 10:55:32.000000000 -0800
@@ -0,0 +1,19 @@
+#include "gstruct.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/gstruct.h	2007-02-20 10:55:47.000000000 -0800
@@ -0,0 +1,36 @@
+/*
+where from: base = matching base; head = other header
+what kind:  ordy = ordinary struct; tmpl = template struct
+definition: decl = incomplete declaration; defn = full definition
+how used:   not = not used; ref = by ref; ptr = through pointer;
+            fld = as field; var = as variable
+from where: base = from base; head = other header
+*/
+
+struct gstruct_head_ordy_decl_not;
+struct gstruct_head_ordy_defn_not { int field_head_ordy_defn_not; };
+
+struct gstruct_head_ordy_decl_ref_head;
+struct gstruct_head_ordy_defn_ref_head { int field_head_ordy_defn_ref_head; };
+struct gstruct_head_ordy_defn_ptr_head { int field_head_ordy_defn_ptr_head; };
+struct gstruct_head_ordy_defn_fld_head { int field_head_ordy_defn_fld_head; };
+struct gstruct_head_ordy_defn_var_head {
+    struct gstruct_head_ordy_decl_ref_head *field_head_ordy_defn_var_head_inc;
+    struct gstruct_head_ordy_defn_ref_head *field_head_ordy_defn_var_head_ref;
+    struct gstruct_head_ordy_defn_ptr_head *field_head_ordy_defn_var_head_ptr;
+    struct gstruct_head_ordy_defn_fld_head  field_head_ordy_defn_var_head_fld;
+};
+extern struct gstruct_head_ordy_defn_var_head head_var1;
+
+struct gstruct_head_ordy_decl_ref_base;
+struct gstruct_head_ordy_defn_ref_base { int field_head_ordy_defn_ref_base; };
+struct gstruct_head_ordy_defn_ptr_base { int field_head_ordy_defn_ptr_base; };
+struct gstruct_head_ordy_defn_fld_base { int field_head_ordy_defn_fld_base; };
+struct gstruct_head_ordy_defn_var_base { int field_head_ordy_defn_var_base; };
+
+inline int head_function() {
+    return 0
++ head_var1.field_head_ordy_defn_var_head_ptr->field_head_ordy_defn_ptr_head
++ head_var1.field_head_ordy_defn_var_head_fld.field_head_ordy_defn_fld_head
+;
+}

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-02-27 20:51 Reduce Dwarf Debug Size Lawrence Crowl
@ 2007-02-27 20:59 ` Andrew Pinski
  2007-02-27 21:14   ` Andrew Pinski
       [not found] ` <796808AD-9E2E-4DD6-B817-2EFDDC1943D8@apple.com>
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 61+ messages in thread
From: Andrew Pinski @ 2007-02-27 20:59 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

On 2/27/07, Lawrence Crowl <crowl@google.com> wrote:
>    -gstruct[=spec-list]
>
>       This option works only with DWARF.

How does it interact with  -femit-class-debug-always?

  -femit-class-debug-always   Do not suppress C++ class debug information.

Also can you rename the option to something like:
-femit-struct-debug[=spec-list].  To me a -gstruct option means there
is a debugging type named struct which is not the case as the type is
still dwarf2/3.

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-02-27 20:59 ` Andrew Pinski
@ 2007-02-27 21:14   ` Andrew Pinski
  0 siblings, 0 replies; 61+ messages in thread
From: Andrew Pinski @ 2007-02-27 21:14 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

On 2/27/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On 2/27/07, Lawrence Crowl <crowl@google.com> wrote:
> >    -gstruct[=spec-list]
> >
> >       This option works only with DWARF.

Also one more thing, can you please write that as DWARF 2, even though
DWARF 1 support was removed from GCC, it is always good to know which
version of DWARF you are talking about.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
       [not found]       ` <m3r6s9x3kn.fsf@dhcp-172-18-118-213.corp.google.com>
@ 2007-03-01  1:24         ` Daniel Jacobowitz
  2007-03-01  1:40           ` Andrew Pinski
  2007-03-01  2:20           ` Ian Lance Taylor
  2007-03-01  1:48         ` Mike Stump
  1 sibling, 2 replies; 61+ messages in thread
From: Daniel Jacobowitz @ 2007-03-01  1:24 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Mike Stump, Lawrence Crowl, gcc-patches

On Wed, Feb 28, 2007 at 03:30:48PM -0800, Ian Lance Taylor wrote:
> I see Lawrence's patch as a different approach which will be useful
> for different people.  Lawrence's patch is a much smaller and simpler
> change than a symbol database.  It requires no significant change to
> existing build systems.

It's simpler, yet the option involves a specification list
and two full pages of documentation which I read twice and still
couldn't figure out when I'd supply which.

> I'm of course not saying that we have to accept Lawrence's patch.  But
> I think that rejecting it in favor of an unbuilt system does not make
> sense.  We should evaluate Lawrence's patch on its own merits: is it
> useful, does it work, is it well-written.

One of those merits is how much good it accomplishes versus how many
ways there are to accomplish similar things.  It's an optional knob
with a lot of complexity.  And it relies on source naming conventions,
which in my humble opinion is a pretty gross thing for GCC to be doing.

Anyway, I've said my piece.  I'll step back now.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  1:24         ` Daniel Jacobowitz
@ 2007-03-01  1:40           ` Andrew Pinski
  2007-03-01  2:22             ` Ian Lance Taylor
  2007-03-01  2:20           ` Ian Lance Taylor
  1 sibling, 1 reply; 61+ messages in thread
From: Andrew Pinski @ 2007-03-01  1:40 UTC (permalink / raw)
  To: Ian Lance Taylor, Mike Stump, Lawrence Crowl, gcc-patches

On 2/28/07, Daniel Jacobowitz <drow@false.org> wrote:
> And it relies on source naming conventions,
> which in my humble opinion is a pretty gross thing for GCC to be doing.

I agree with that part, I was going to mention it when I saw that.  It
forces a naming convention on people.  Even there are cases where
classes are always in the headers and there is no corresponding source
file to them.

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
       [not found]       ` <m3r6s9x3kn.fsf@dhcp-172-18-118-213.corp.google.com>
  2007-03-01  1:24         ` Daniel Jacobowitz
@ 2007-03-01  1:48         ` Mike Stump
  2007-03-01  2:27           ` Ian Lance Taylor
  1 sibling, 1 reply; 61+ messages in thread
From: Mike Stump @ 2007-03-01  1:48 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Daniel Jacobowitz, Lawrence Crowl, gcc-patches

On Feb 28, 2007, at 3:30 PM, Ian Lance Taylor wrote:
> We should evaluate Lawrence's patch on its own merits: is it  
> useful, does it work, is it well-written.

I'm game for this.  I just worry that it works fine for all sample  
programs 500 lines or less and on nothing larger.  I'd rather have a  
real user evaluate it in the context of a use pattern and tell us now  
it performs for them.

In the various scheme we've done, and we've done a few, leaving the  
debugging information in the .o files and having a utility to boost  
them out and save them, if you need to do that, is the current winner.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
       [not found]     ` <20070228220350.GA20232@caradoc.them.org>
       [not found]       ` <m3r6s9x3kn.fsf@dhcp-172-18-118-213.corp.google.com>
@ 2007-03-01  1:52       ` Mike Stump
  1 sibling, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-01  1:52 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Ian Lance Taylor, Lawrence Crowl, gcc-patches

On Feb 28, 2007, at 2:03 PM, Daniel Jacobowitz wrote:
> I don't think the patch is a good direction.  The basic model of - 
> frepo makes more sense, though the actual implementation of  
> collect2 doesn't seem like a good fit.  Didn't Apple work on a  
> 'symbol database' concept at one point?

Yes.  Fully debugging information in an sql lite db,

> My overall mental model for this problem, which I've spent quite a  
> long time thinking about but very little time fixing, goes like this:
>
>   - Have a symbol database per "project".

Sounds like -frepo.  My model of -frepo includes -frep=my-project- 
repo.db.

>   - When compiling a file, generate complete debug info for each  
> included header iff the database says it is not yet output,

Sounds like the repo optimization where, given a database for the  
entire project above, you opportunistically output things if they  
haven't been output already, in the first pass.  One is free to do  
this with repo and is an orthogonal speedup.

>     or if (magic happens) it appears to be stale.  (other magic
>     happens) to handle including files with different #define's
>     that would affect the debug info.  Note, incompatible with
>     omitting unused information.

Not incompatible with it from my perspective, worse case, one might  
see extra recompiles.

>   We generate bigger debug info this way but a lot less overall.

By doing it based upon first need, trivially, there isn't any extra.

>   - Generate that debug info either into objects, or into the
>     symbol database, which is more complicated but more flexible if
>     multiple binaries get linked from the same object files.  In
>     practice maybe that means one debug file per .o file.

One has to be very careful to not engineer a scheme that is 10x  
slower at compiling.  We have implementation experience with the  
debug into in the sqllite db approach.  Let's just say, I think the - 
frepo extension is better.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  1:24         ` Daniel Jacobowitz
  2007-03-01  1:40           ` Andrew Pinski
@ 2007-03-01  2:20           ` Ian Lance Taylor
  2007-03-01  3:41             ` Daniel Jacobowitz
  1 sibling, 1 reply; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01  2:20 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Mike Stump, Lawrence Crowl, gcc-patches

Daniel Jacobowitz <drow@false.org> writes:

> On Wed, Feb 28, 2007 at 03:30:48PM -0800, Ian Lance Taylor wrote:
> > I see Lawrence's patch as a different approach which will be useful
> > for different people.  Lawrence's patch is a much smaller and simpler
> > change than a symbol database.  It requires no significant change to
> > existing build systems.
> 
> It's simpler, yet the option involves a specification list
> and two full pages of documentation which I read twice and still
> couldn't figure out when I'd supply which.

It would be great if you or others could suggest simplifications.
It's not like this patch is "take it or leave it."

> And it relies on source naming conventions,
> which in my humble opinion is a pretty gross thing for GCC to be doing.

I don't think that is so bad, especially since it is a common
convention in the C++ world.  And of course it is optional.  Again
better suggestions are welcome.


C++ debug info size is a problem for real uses of gcc.  We've got a
patch on the table.  We don't have to use it.  But while I would love
to see a symbol database, I don't see that as a viable alternative for
all people.  And it doesn't exist and it's not trivial to implement
and nobody is working on it.

Does anybody else have any concrete suggestions for how to move
forward?

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  1:40           ` Andrew Pinski
@ 2007-03-01  2:22             ` Ian Lance Taylor
  0 siblings, 0 replies; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01  2:22 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Mike Stump, Lawrence Crowl, gcc-patches

"Andrew Pinski" <pinskia@gmail.com> writes:

> On 2/28/07, Daniel Jacobowitz <drow@false.org> wrote:
> > And it relies on source naming conventions,
> > which in my humble opinion is a pretty gross thing for GCC to be doing.
> 
> I agree with that part, I was going to mention it when I saw that.  It
> forces a naming convention on people.  Even there are cases where
> classes are always in the headers and there is no corresponding source
> file to them.

To be clear, it doesn't force anything.  It's optional.  It's only
going to be useful for people who already use that convention.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  1:48         ` Mike Stump
@ 2007-03-01  2:27           ` Ian Lance Taylor
  2007-03-01  3:06             ` Mike Stump
  0 siblings, 1 reply; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01  2:27 UTC (permalink / raw)
  To: Mike Stump; +Cc: Daniel Jacobowitz, Lawrence Crowl, gcc-patches

Mike Stump <mrs@apple.com> writes:

> On Feb 28, 2007, at 3:30 PM, Ian Lance Taylor wrote:
> > We should evaluate Lawrence's patch on its own merits: is it
> > useful, does it work, is it well-written.
> 
> I'm game for this.  I just worry that it works fine for all sample
> programs 500 lines or less and on nothing larger.  I'd rather have a
> real user evaluate it in the context of a use pattern and tell us now
> it performs for them.

Lawrence has already evaluated it on Google's internal codebase, which
is more than 500 lines.  Lawrence, could you send out the various
tables showing the percentage reductions for the various options?
Thanks.

> In the various scheme we've done, and we've done a few, leaving the
> debugging information in the .o files and having a utility to boost
> them out and save them, if you need to do that, is the current winner.

That approach doesn't work well for us because it requires you to keep
the .o files around if you want to do any debugging.  And it requires
a reliable mapping from an executable back to the .o files used to
generate it.  There are certainly scenarios where that can work.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  2:27           ` Ian Lance Taylor
@ 2007-03-01  3:06             ` Mike Stump
  0 siblings, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-01  3:06 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Daniel Jacobowitz, Lawrence Crowl, gcc-patches

On Feb 28, 2007, at 6:26 PM, Ian Lance Taylor wrote:
> That approach doesn't work well for us because it requires you to keep
> the .o files around if you want to do any debugging.

Nope, but one does have to otherwise `do something'.  For example, we  
enter all debugging information into a large db that is indexed by a  
uuid.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  2:20           ` Ian Lance Taylor
@ 2007-03-01  3:41             ` Daniel Jacobowitz
  2007-03-01  5:48               ` Ian Lance Taylor
  0 siblings, 1 reply; 61+ messages in thread
From: Daniel Jacobowitz @ 2007-03-01  3:41 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Mike Stump, Lawrence Crowl, gcc-patches

On Wed, Feb 28, 2007 at 06:19:41PM -0800, Ian Lance Taylor wrote:
> It would be great if you or others could suggest simplifications.
> It's not like this patch is "take it or leave it."

If there is a general consensus that the approach is OK, then I would
recommend removing most of the optional combinations.  I bet you can
find a maximum of three clearly increasing levels that work for the
vast majority of people for whom it is useful at all.

I feel like I'm saying the same thing over and over.  The new aliasing
warnings and the new overflow warnings both come with too many levels
in my opinion.  More flexibility on the command line is _not_ a good
thing.  It becomes decreasingly likely that people will figure out
correctly what they really need, or understand what they've chosen.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  3:41             ` Daniel Jacobowitz
@ 2007-03-01  5:48               ` Ian Lance Taylor
  2007-03-01 21:07                 ` Lawrence Crowl
  0 siblings, 1 reply; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01  5:48 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Mike Stump, Lawrence Crowl, gcc-patches

Daniel Jacobowitz <drow@false.org> writes:

> On Wed, Feb 28, 2007 at 06:19:41PM -0800, Ian Lance Taylor wrote:
> > It would be great if you or others could suggest simplifications.
> > It's not like this patch is "take it or leave it."
> 
> If there is a general consensus that the approach is OK, then I would
> recommend removing most of the optional combinations.  I bet you can
> find a maximum of three clearly increasing levels that work for the
> vast majority of people for whom it is useful at all.

I agree.

> I feel like I'm saying the same thing over and over.  The new aliasing
> warnings and the new overflow warnings both come with too many levels
> in my opinion.  More flexibility on the command line is _not_ a good
> thing.  It becomes decreasingly likely that people will figure out
> correctly what they really need, or understand what they've chosen.

I agree here too.  I added the levels to -Wstrict-overflow upon
request.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01  5:48               ` Ian Lance Taylor
@ 2007-03-01 21:07                 ` Lawrence Crowl
  2007-03-01 21:15                   ` Daniel Jacobowitz
  2007-03-01 21:35                   ` Joseph S. Myers
  0 siblings, 2 replies; 61+ messages in thread
From: Lawrence Crowl @ 2007-03-01 21:07 UTC (permalink / raw)
  To: Ian Lance Taylor, Daniel Jacobowitz, Mike Stump, Andrew Pinski
  Cc: gcc-patches

Andrew Pinski <pinskia@gmail.com>
> How does it interact with  -femit-class-debug-always?

The new option is a filter on dwarf emission, and so it applies
after this option.

> Also can you rename the option to something like:
> -femit-struct-debug[=spec-list].  To me a -gstruct option means
> there is a debugging type named struct which is not the case as
> the type is still dwarf2/3.

Sure.

> Also one more thing, can you please write that as DWARF 2, even
> though DWARF 1 support was removed from GCC, it is always good to
> know which version of DWARF you are talking about.

Sure.

Mike Stump <mrs@apple.com>
> I have a counter proposal, instead, use -frepo to select where
> you want to lay down the debug information.

Ian Lance Taylor <iant@google.com>
> -frepo is fragile for large projects, and it affects much more
> than debug information.  I don't think it is a real alternative.

Given the large project problem, I would rather not persue -frepo.

Daniel Jacobowitz <drow@false.org>
> I realize a lot of work went into this patch, and I do appreciate
> Lawrence working on this hard problem; but I think yet another
> (our third or maybe fourth) option to omit a specific set of debug
> info is the exactly wrong solution.

A more comprehensive solution would be better.  I am the first
to admit that my patch is not a final solution.  However, the
comprehensive patches are not available, and hence are solving
no problems.  This patch does solve significant problems today.
Think of the patch as buying time for the better solution.

Ian Lance Taylor <iant@google.com>
> Lawrence's patch is a much smaller and simpler change than a
> symbol database.  It requires no significant change to existing
> build systems.

Daniel Jacobowitz <drow@false.org>
> It's simpler, yet the option involves a specification list and two
> full pages of documentation which I read twice and still couldn't
> figure out when I'd supply which.  It's an optional knob with a
> lot of complexity.

You are reading ahead of your needs.  For most people, there are
only three spellings that you need to worry about.

    <no option>    nothing different
    -gstruct       save a bunch of space, little impact on debugging
    -gstruct=base  save more space, but more impact on debugging

The rest of the specification exists because the simple-to-use
"-gstruct" has a complicated specification and people with problems
might want access to the mechanisms needed to implement the plain
version.

> And it relies on source naming conventions, which in my humble
> opinion is a pretty gross thing for GCC to be doing.

Andrew Pinski <pinskia@gmail.com>
> It forces a naming convention on people.  Even there are cases where
> classes are always in the headers and there is no corresponding
> source file to them.

I would characterize it as exploiting a naming convention that is
used by nearly all programmers.  The option doesn't help you if your
naming convention doesn't match.  Just as importantly, the option
doesn't hurt doesn't hurt because if you don't ask for the option,
nothing changes.

Mike Stump <mrs@apple.com>
> I just worry that it works fine for all sample programs 500 lines or
> less and on nothing larger.  I'd rather have a real user evaluate
> it in the context of a use pattern and tell us now it performs
> for them.

The motivation and experiments for this option were very large
applications.  Small applications don't need the option because
the amount of space you save isn't work worrying about.

Ian Lance Taylor <iant@google.com>
> Lawrence has already evaluated it on Google's internal codebase,
> which is more than 500 lines.  Lawrence, could you send out the
> various tables showing the percentage reductions for the various
> options?

Actually, I did this in the original email.  Here it is for a
very large application.

 debug executable
  size   size
  100%   100%   with only -g
   60%    73%   with -g -gstruct
   37%    58%   with -g -gstruct=base

So in rough numbers, the option buys you a factor of 2.5 in debug
size and a factor of 1.7 in executable size (because the debug size
is a large fraction of the executable size).

Mike Stump <mrs@apple.com>
> In the various scheme we've done, and we've done a few, leaving
> the debugging information in the .o files and having a utility
> to boost them out and save them, if you need to do that, is the
> current winner.

Ian Lance Taylor <iant@google.com>
> That approach doesn't work well for us because it requires you to
> keep the .o files around if you want to do any debugging.

Just as importantly, the .o files themselves take more space.  In a
distcc environment, excess .o size translates to higher bandwidth
requirements and more delay.

Daniel Jacobowitz <drow@false.org>
> If there is a general consensus that the approach is OK, then I
> would recommend removing most of the optional combinations.  I bet
> you can find a maximum of three clearly increasing levels that
> work for the vast majority of people for whom it is useful at all.

I identified those levels earlier.  Would it be sufficient to
reorient the documentation to focus on those levels and leave the
detailed specification to later?


So, these are my action items, unless I hear otherwise.

(1) Change the option name to -femit-struct-debug[=spec-list].
(2) Rewrite the documentation to focus on the primary use cases.

Amendments?

-- 
Lawrence Crowl

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 21:07                 ` Lawrence Crowl
@ 2007-03-01 21:15                   ` Daniel Jacobowitz
  2007-03-01 22:32                     ` Lawrence Crowl
  2007-03-01 21:35                   ` Joseph S. Myers
  1 sibling, 1 reply; 61+ messages in thread
From: Daniel Jacobowitz @ 2007-03-01 21:15 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: Ian Lance Taylor, Mike Stump, Andrew Pinski, gcc-patches

On Thu, Mar 01, 2007 at 01:06:53PM -0800, Lawrence Crowl wrote:
> I identified those levels earlier.  Would it be sufficient to
> reorient the documentation to focus on those levels and leave the
> detailed specification to later?

I would certainly be happier if you did that; I am also not convinced
that providing the additional flexibility for people who wish to
tweak this is really useful, so I'd be even happier if the other
possible options went away.  That's just my opinion though.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 21:07                 ` Lawrence Crowl
  2007-03-01 21:15                   ` Daniel Jacobowitz
@ 2007-03-01 21:35                   ` Joseph S. Myers
  2007-03-01 22:07                     ` Mike Stump
  2007-03-01 22:12                     ` Lawrence Crowl
  1 sibling, 2 replies; 61+ messages in thread
From: Joseph S. Myers @ 2007-03-01 21:35 UTC (permalink / raw)
  To: Lawrence Crowl
  Cc: Ian Lance Taylor, Daniel Jacobowitz, Mike Stump, Andrew Pinski,
	gcc-patches

On Thu, 1 Mar 2007, Lawrence Crowl wrote:

> > And it relies on source naming conventions, which in my humble
> > opinion is a pretty gross thing for GCC to be doing.
> 
> Andrew Pinski <pinskia@gmail.com>
> > It forces a naming convention on people.  Even there are cases where
> > classes are always in the headers and there is no corresponding
> > source file to them.
> 
> I would characterize it as exploiting a naming convention that is
> used by nearly all programmers.  The option doesn't help you if your

Statistical evidence?

Here's a possible alternative to a naming convention: an attribute on a 
class to disable emitting debug info for that class.  The source file that 
forces emission of the debug info for that class would then define a macro 
before including the header, and that macro would cause the attribute not 
to be used by the header.  (You could use a pragma for the whole header 
file instead of an attribute to reduce the size of the changes, but an 
attribute is more flexible.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 21:35                   ` Joseph S. Myers
@ 2007-03-01 22:07                     ` Mike Stump
  2007-03-01 22:12                     ` Lawrence Crowl
  1 sibling, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-01 22:07 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Lawrence Crowl, Ian Lance Taylor, Daniel Jacobowitz,
	Andrew Pinski, gcc-patches

On Mar 1, 2007, at 1:35 PM, Joseph S. Myers wrote:
> Here's a possible alternative to a naming convention: an attribute  
> on a
> class to disable emitting debug info for that class.

Congratulations, you've just reinvented #pragma interface/ 
implementation.  :-)

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 21:35                   ` Joseph S. Myers
  2007-03-01 22:07                     ` Mike Stump
@ 2007-03-01 22:12                     ` Lawrence Crowl
  1 sibling, 0 replies; 61+ messages in thread
From: Lawrence Crowl @ 2007-03-01 22:12 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Ian Lance Taylor, Daniel Jacobowitz, Mike Stump, Andrew Pinski,
	gcc-patches

On 3/1/07, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Thu, 1 Mar 2007, Lawrence Crowl wrote:
>
> > > And it relies on source naming conventions, which in my humble
> > > opinion is a pretty gross thing for GCC to be doing.
> >
> > Andrew Pinski <pinskia@gmail.com>
> > > It forces a naming convention on people.  Even there are cases where
> > > classes are always in the headers and there is no corresponding
> > > source file to them.
> >
> > I would characterize it as exploiting a naming convention that is
> > used by nearly all programmers.  The option doesn't help you if your
>
> Statistical evidence?

I have none, but I do have years of experience with C/C++ projects.

> Here's a possible alternative to a naming convention: an attribute on a
> class to disable emitting debug info for that class.  The source file that
> forces emission of the debug info for that class would then define a macro
> before including the header, and that macro would cause the attribute not
> to be used by the header.  (You could use a pragma for the whole header
> file instead of an attribute to reduce the size of the changes, but an
> attribute is more flexible.)

This option is for large applications -- applications where any one person
does not have the energy or authority to make such massive code changes.
Such changes are particularly problematic when the syntax is not standard
because institutions will often simply refuse to adopt the syntax.

I don't want to exclude such a syntax, I just think it is solving a different
problem.

-- 
Lawrence Crowl

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 21:15                   ` Daniel Jacobowitz
@ 2007-03-01 22:32                     ` Lawrence Crowl
  0 siblings, 0 replies; 61+ messages in thread
From: Lawrence Crowl @ 2007-03-01 22:32 UTC (permalink / raw)
  To: Lawrence Crowl, Ian Lance Taylor, Mike Stump, Andrew Pinski, gcc-patches

On 3/1/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Mar 01, 2007 at 01:06:53PM -0800, Lawrence Crowl wrote:
> > I identified those levels earlier.  Would it be sufficient to
> > reorient the documentation to focus on those levels and leave the
> > detailed specification to later?
>
> I would certainly be happier if you did that; I am also not convinced
> that providing the additional flexibility for people who wish to
> tweak this is really useful, so I'd be even happier if the other
> possible options went away.  That's just my opinion though.

I could simply not document the specification in any more depth than

   <no option> -- the current compiler behavior
   -femit-struct-debug=base -- save lots of space, lose some debugging
   -femit-struct-debug -- a generally good compromise

The specification would still be there if we decided we needed it later.

-- 
Lawrence Crowl

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-02-27 20:51 Reduce Dwarf Debug Size Lawrence Crowl
  2007-02-27 20:59 ` Andrew Pinski
       [not found] ` <796808AD-9E2E-4DD6-B817-2EFDDC1943D8@apple.com>
@ 2007-03-02  3:04 ` Mark Mitchell
  2007-03-02  4:05   ` Mike Stump
  2007-03-03  4:17 ` Michael Eager
  2007-03-03  5:36 ` Alexandre Oliva
  4 siblings, 1 reply; 61+ messages in thread
From: Mark Mitchell @ 2007-03-02  3:04 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

Lawrence Crowl wrote:

> A major contribution to object and executable size is DWARF debug
> information size.  A major contribution to debug information
> size is struct descriptions replicated in several object files.
> This patch adds an option to reduce the size of this information,
> which mainly benefits C++.

Thank you for working on this problem.

I've read through this thread, and I agree with several of the key points:

1. A repository-based approach (whether based on -frepo and collect2, or
otherwise) would be a good thing to have in GCC, but isn't practical for
all projects.  (I think it could be practical for many projects, though.
 The usual objection is that you don't always have all the objects at
link time, but that can be overcome in many cases by generating all
necessary debug information when using "ld -r" or "ar" to build an
intermediate step.  You don't necessarily then eliminate all
duplication, but you eliminate much of it.)

2. A variant of (1) which leaves information in the object files doesn't
work for all projects (you need the object files at debug time, not just
the final executable), but clearly works for some, as Apple has
demonstrated.  That would be nice too.

3. This new option also won't work for everything, but it does do
something useful some of the time, and I think the heuristics are
reasonable.

5. We shouldn't let perfect be the enemy of good.

6. We should control the number of knobs people can twist, and the
number of points to which they can be twisted, and we already have too
many knobs and too many twist-points.

7. Apple pie is good.  Pecan pie can be good too, but only if doesn't
have too many nuts, and, anyhow, fruit pies are better than nut pies.

Here's my opinion:

1. I think that the idea of this patch is good.  It's a good-enough
heuristic that I imagine it will help a lot of people a lot.

2. As Daniel says, I don't think we need the full generality of the
patch, and I don't think that level of generality is desirable, either
in the documentation or the implementation.  In fact, I'm not sure *any*
generality is necessary.  I rather think we should just go with the
equivalent of -gstruct=base.

3. Most unnecessary debug information could be removed *at link-time* by
putting debugging information in COMDAT groups.  That would not affect
.o file size, which is also important, but it would help some users.
Just as having an -frepo-like option for debugging would be useful, so
would having a Borland-template model for debugging information.

4. As Mike says, this is a lot like #pragma interface/implementation,
further emphasizing the similarity between the debugging issue and the
template instantiation issue.  In fact, I believe that #pragma interface
already does suppress debug information.  (That's what the documentation
suggests, and if it doesn't so suppress, that's a bug, IMO.)  Can we
have a -f<something> option that says that we should assume pragma
interface for .h files, and pragma implementation for .c/.cpp files?
Or, if we must, -f<something>={debug,functions,class} to say that the
implicit pragma applies to debugging information, function bodies, and
class data?  The advantage of this approach is that it would reuse
existing code, rather than adding an entirely distinct mechanism.

5. I wish I had some apple pie.  Or cherry.  I'm not in the mood for pecan.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  3:04 ` Mark Mitchell
@ 2007-03-02  4:05   ` Mike Stump
  0 siblings, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-02  4:05 UTC (permalink / raw)
  To: Mark Mitchell; +Cc: Lawrence Crowl, gcc-patches

On Mar 1, 2007, at 7:03 PM, Mark Mitchell wrote:
> 7. Apple pie is good.  Pecan pie can be good too, but only if doesn't
> have too many nuts, and, anyhow, fruit pies are better than nut pies.

Gosh, first iPods, then set top boxes and iPhones, now we're doing  
pies!  I'll tell Steve you said no nuts.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-02-27 20:51 Reduce Dwarf Debug Size Lawrence Crowl
                   ` (2 preceding siblings ...)
  2007-03-02  3:04 ` Mark Mitchell
@ 2007-03-03  4:17 ` Michael Eager
  2007-03-03 22:33   ` Daniel Berlin
  2007-03-04  4:40   ` Ian Lance Taylor
  2007-03-03  5:36 ` Alexandre Oliva
  4 siblings, 2 replies; 61+ messages in thread
From: Michael Eager @ 2007-03-03  4:17 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

Lawrence Crowl wrote:
> A major contribution to object and executable size is DWARF debug
> information size.  A major contribution to debug information
> size is struct descriptions replicated in several object files.
> This patch adds an option to reduce the size of this information,
> which mainly benefits C++.
> 
> The basic idea is to not emit struct debugging information in the
> current compilation unit when that information will be generated
> by another compilation unit.  The primary criteria is whether the
> base name of the file containing the struct definition matches the
> base name of the main file being compiled.  For example, if struct
> foo is defined in bar.h, then when used in bar.c, the compiler will
> generate the struct debugging information.  On the other hand, when
> used in ping.c, the compiler will not generate the information.
> This simple approach is complicated by templates, system headers,
> indirect use of structs, etc.

I'm all in favor of reducing the size of DWARF data in executables,
but I don't think that this is the best approach.  This scheme
is reminiscent of similar problems related to C++ templates:
whether to generate code, where to generate it, and how to
manage generated code.  I think that this scheme has the same
problems which show up with template schemes which try to use
heuristics to determine when template code is generated.

While it may be common for "struct foo" to be defined in "foo.h"
and used in "foo.c", this is not the only time that a struct
is defined or used.  What if there is a "struct foo_helper" also
defined in "foo.h"?  Where is the debug info for this generated?
Is a file "foo_helper.c" required?

What happens if you compile "foo.c" without -g?  (For example,
if "foo.c" is in a library.)  If you have "bar.c", which includes
"foo.h", compiled with -g, gdb will not find a definition for
"struct foo".  I can imagine that the programmer would spend a
fair amount of time trying to figure out why adding '-g' to the
compiler command line or, more likely, to the invocation of
make, fails to work.  And, oddly enough, gdb would appear to
work for "bar.c", displaying source and most values, just not
letting the programmer display members of "struct foo".
(Consider the common case when "bar.c" is compiled as part of
a large project; determining that one of the many compiler
options is causing this strange behavior may take a while.)

If the problem is multiple copies of DWARF data included in
executables, I think that the solution for this lies in having
the linker eliminating duplicate definitions.  Another way
to address this is to have the executable contain references
to the object files and read debug data from there as needed.
I believe that the DWARF Committee will be considering a
proposal to that effect.

-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-02-27 20:51 Reduce Dwarf Debug Size Lawrence Crowl
                   ` (3 preceding siblings ...)
  2007-03-03  4:17 ` Michael Eager
@ 2007-03-03  5:36 ` Alexandre Oliva
  2007-03-05 17:35   ` Mike Stump
  4 siblings, 1 reply; 61+ messages in thread
From: Alexandre Oliva @ 2007-03-03  5:36 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

On Feb 27, 2007, "Lawrence Crowl" <crowl@google.com> wrote:

> A major contribution to object and executable size is DWARF debug
> information size.  A major contribution to debug information
> size is struct descriptions replicated in several object files.

Wouldn't LTO implicitly fix this?

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

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-03  4:17 ` Michael Eager
@ 2007-03-03 22:33   ` Daniel Berlin
  2007-03-04 17:58     ` Mark Mitchell
  2007-03-04  4:40   ` Ian Lance Taylor
  1 sibling, 1 reply; 61+ messages in thread
From: Daniel Berlin @ 2007-03-03 22:33 UTC (permalink / raw)
  To: Michael Eager; +Cc: Lawrence Crowl, gcc-patches

On 3/2/07, Michael Eager <eager@eagercon.com> wrote:
> Lawrence Crowl wrote:
> > A major contribution to object and executable size is DWARF debug
> > information size.  A major contribution to debug information
> > size is struct descriptions replicated in several object files.
> > This patch adds an option to reduce the size of this information,
> > which mainly benefits C++.
> >
> > The basic idea is to not emit struct debugging information in the
> > current compilation unit when that information will be generated
> > by another compilation unit.  The primary criteria is whether the
> > base name of the file containing the struct definition matches the
> > base name of the main file being compiled.  For example, if struct
> > foo is defined in bar.h, then when used in bar.c, the compiler will
> > generate the struct debugging information.  On the other hand, when
> > used in ping.c, the compiler will not generate the information.
> > This simple approach is complicated by templates, system headers,
> > indirect use of structs, etc.
.)
>
> If the problem is multiple copies of DWARF data included in
> executables, I think that the solution for this lies in having
> the linker eliminating duplicate definitions.  Another way
> to address this is to have the executable contain references
> to the object files and read debug data from there as needed.
> I believe that the DWARF Committee will be considering a
> proposal to that effect.

Everyone is always in favor of the linker approach (or a symbol
database, or any other myriad of better solutions), but
1. Reading in and duplicate eliminating gigabytes of debug info is no
picnic in the linker either.
and more importantly
2. People have been talking about doing duplicate DWARF2 elimination
in ld for 5+years now, and it hasn't gotten done.  It's just very hard
to do in the current linker.

Whenever someone comes up with a working patch that actually helps
with the problem for some significant class of users, there are always
objections that it could be done better.
This is almost always true.
However, unlike most patches of this nature (helping some subset of
users), this patch
1. Makes it neither harder nor easier to do something better (which is
usually not true of most other not-best-solution patches)
2. Is not large enough to be a real maintenance burden
3. Has been tested and shown to work well for at least one very large codebase.

If you want to go implement DWARF2 elimination in ld, patches are of
course welcome.
In the meantime, I agree with Ian that we should consider this one, as
I don't see the harm.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-03  4:17 ` Michael Eager
  2007-03-03 22:33   ` Daniel Berlin
@ 2007-03-04  4:40   ` Ian Lance Taylor
  1 sibling, 0 replies; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-04  4:40 UTC (permalink / raw)
  To: Michael Eager; +Cc: Lawrence Crowl, gcc-patches

Michael Eager <eager@eagercon.com> writes:

> Lawrence Crowl wrote:
> > A major contribution to object and executable size is DWARF debug
> > information size.  A major contribution to debug information
> > size is struct descriptions replicated in several object files.
> > This patch adds an option to reduce the size of this information,
> > which mainly benefits C++.
> > The basic idea is to not emit struct debugging information in the
> > current compilation unit when that information will be generated
> > by another compilation unit.  The primary criteria is whether the
> > base name of the file containing the struct definition matches the
> > base name of the main file being compiled.  For example, if struct
> > foo is defined in bar.h, then when used in bar.c, the compiler will
> > generate the struct debugging information.  On the other hand, when
> > used in ping.c, the compiler will not generate the information.
> > This simple approach is complicated by templates, system headers,
> > indirect use of structs, etc.
> 
> I'm all in favor of reducing the size of DWARF data in executables,
> but I don't think that this is the best approach.  This scheme
> is reminiscent of similar problems related to C++ templates:
> whether to generate code, where to generate it, and how to
> manage generated code.  I think that this scheme has the same
> problems which show up with template schemes which try to use
> heuristics to determine when template code is generated.
> 
> While it may be common for "struct foo" to be defined in "foo.h"
> and used in "foo.c", this is not the only time that a struct
> is defined or used.  What if there is a "struct foo_helper" also
> defined in "foo.h"?  Where is the debug info for this generated?
> Is a file "foo_helper.c" required?

Lawrence's patch does not compare the name of the struct with the name
of the file.  What it compares is the name of the .h file with the
name of the .cc file.  That is, if you specify the appropriate option
(-gstruct=base in the first version of his patch) when compiling
foo.cc, then the only structs for which debugging information will be
generated in foo.o will be those defined in foo.h.

> What happens if you compile "foo.c" without -g?  (For example,
> if "foo.c" is in a library.)  If you have "bar.c", which includes
> "foo.h", compiled with -g, gdb will not find a definition for
> "struct foo".

Lawrence's patch does not apply by default.  If you compile bar.c with
-g, and bar.c includes foo.h, then bar.o will include full debugging
information for all the types defined in foo.h.

> If the problem is multiple copies of DWARF data included in
> executables, I think that the solution for this lies in having
> the linker eliminating duplicate definitions.

Yes, that would be nice.  Of course, it's always cheaper to not
generate the debugging information in the first place than it is to
generate that and then eliminate duplicate information.

> Another way
> to address this is to have the executable contain references
> to the object files and read debug data from there as needed.

Sure, that would be nice too, and indeed I believe that some people
have this working already.  It doesn't help in all situations.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-03 22:33   ` Daniel Berlin
@ 2007-03-04 17:58     ` Mark Mitchell
  0 siblings, 0 replies; 61+ messages in thread
From: Mark Mitchell @ 2007-03-04 17:58 UTC (permalink / raw)
  To: Daniel Berlin; +Cc: Michael Eager, Lawrence Crowl, gcc-patches

Daniel Berlin wrote:

> People have been talking about doing duplicate DWARF2 elimination
> in ld for 5+years now, and it hasn't gotten done.  It's just very hard
> to do in the current linker

I do not believe this is a incredibly hard project.  It's a tweener:
it's not a weekend's work, but it's not TREE-SSA (or even LTO) either.
We've looked at it, and I would estimate 1-4 person-months, depending on
who works on it, how far you take it, how many platforms you enable it
for, and how buggy your first-cut code tends to be. :-)

I think it's inarguable that this approach would be useful to many.  I'm
not saying it's a panacea, better than Lawrence's patch, etc.; I'm just
saying it would be useful, and that it's doable.

> In the meantime, I agree with Ian that we should consider this one, as
> I don't see the harm.

I've previously agreed with this statement, and I still do. :-)  I did
make some implementation suggestions, but, in principle, I think this
kind of functionality is worth considering.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-03  5:36 ` Alexandre Oliva
@ 2007-03-05 17:35   ` Mike Stump
  2007-03-23 21:05     ` Lawrence Crowl
  0 siblings, 1 reply; 61+ messages in thread
From: Mike Stump @ 2007-03-05 17:35 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: Lawrence Crowl, gcc-patches

On Mar 2, 2007, at 9:35 PM, Alexandre Oliva wrote:
> On Feb 27, 2007, "Lawrence Crowl" <crowl@google.com> wrote:
> Wouldn't LTO implicitly fix this?

People aren't always going to run LTO.  Any time spent in LTO is  
probably going to be a slowdown.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-05 17:35   ` Mike Stump
@ 2007-03-23 21:05     ` Lawrence Crowl
  2007-04-05 16:32       ` Ian Lance Taylor
  2007-04-17  7:27       ` Ian Lance Taylor
  0 siblings, 2 replies; 61+ messages in thread
From: Lawrence Crowl @ 2007-03-23 21:05 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 5652 bytes --]

This patch is a resubmit of the earlier patch.  It addresses the
concerns voice, where possible.

==

A major contribution to object and executable size is DWARF debug
information size.  A major contribution to debug information
size is struct descriptions replicated in several object files.
This patch adds an option to reduce the size of this information,
which mainly benefits C++.

The basic idea is to not emit struct debugging information in the
current compilation unit when that information will be generated
by another compilation unit.  The primary criteria is whether the
base name of the file containing the struct definition matches the
base name of the main file being compiled.  For example, if struct
foo is defined in bar.h, then when used in bar.c, the compiler will
generate the struct debugging information.  On the other hand, when
used in ping.c, the compiler will not generate the information.
In simple terms, the option matches the filename of the header
defining the struct to the filename of the compilation unit.

This simple approach is complicated by templates, system headers,
indirect use of structs, etc.

Because there is less information, there is a chance that debugging
may be impaired.  Therefore, the compiler's default behavior is
unchanged and the option has a value that enables you to chose the
size versus debuggibility, that is, to choose the criteria by which
struct debugging information will be emitted.  The most important
choices are as follows.

   By default, the compiler's and debugger's behavior does not
   change.

   With -g -femit-struct-debug-reduced, the compiler conservatively
   suppresses some struct debug information.  Debugging behavior
   should be mostly unimpaired, except perhaps for interactions
   with non-system libraries built without -g.

   With -g -femit-struct-debug-baseonly, the compiler emits struct
   information on strictly matching file base names.  Debugging
   templates or structs defined in system headers will be impaired.

Experimentally, the size savings can be significant.  On one very
large application, the sizes were:

  debug executable
   size   size
   100%   100%   with only -g
    60%    73%   with -g -femit-struct-debug-reduced
    37%    58%   with -g -femit-struct-debug-baseonly

The option documentation in texinfo is:

   -femit-struct-debug-baseonly
      Emit debug information for struct-like types only when the
      base name of the compilation source file matches the base
      name of file in which the struct was defined.

      This option substantially reduces the size of debugging
      information, but at significant potential loss in type
      information to the debugger.  See -femit-struct-debug-reduced
      for a less aggressive option.  See -femit-struct-debug-detailed
      for more detailed control.

      This option works only with DWARF 2.

   -femit-struct-debug-reduced
      Emit debug information for struct-like types only when the
      base name of the compilation source file matches the base name
      of file in which the type was defined, unless the struct is
      a template or defined in a system header.

      This option significantly reduces the size of debugging
      information, with some potential loss in type information to
      the debugger.  See -femit-struct-debug-baseonly for a more
      aggressive option.  See -femit-struct-debug-detailed for more
      detailed control.

      This option works only with DWARF 2.

   -femit-struct-debug-detailed[=spec-list]
      Specify the struct-like types for which the compiler will
      generate debug information.  The intent is to reduce duplicate
      struct debug information between different object files within
      the same program.

      This option is a detailed version of
      -femit-struct-debug-reduced and -femit-struct-debug-baseonly,
      which will serve for most needs.

      A specification has the syntax
      [dir:|ind:][ord:|gen:](any|sys|base|none)

      The optional first word limits the specification to structs
      that are used directly (dir:) or used indirectly (ind:).
      A struct type is used directly when it is the type of a
      variable, member.  Indirect uses arise through pointers to
      structs.  That is, when use of an incomplete struct would be
      legal, the use is indirect.  An example is struct one direct;
      struct two * indirect;.

      The optional second word limits the specification to ordinary
      structs (ord:) or generic structs (gen:).  Generic structs are
      a bit complicated to explain.  For C++, these are non-explicit
      specializations of template classes, or non-template classes
      within the above.  Other programming languages have generics,
      but -femit-struct-debug-detailed does not yet implement them.

      The third word specifies the source files for those structs for
      which the compiler will emit debug information.  The values
      none and any have the normal meaning.  The value base means
      that the base of name of the file in which the type declaration
      appears must match the base of the name of the main compilation
      file.  In practice, this means that types declared in foo.c
      and foo.h will have debug information, but types declared
      in other header will not.  The value sys means those types
      satisfying base or declared in system or compiler headers.

      You may need to experiment to determine the best settings
      for your application.

      The default is -femit-struct-debug-detailed=all.

      This option works only with DWARF 2.

-- 
Lawrence Crowl

[-- Attachment #2: gcc-fesd-compiler-changelog.txt --]
[-- Type: text/plain, Size: 2244 bytes --]

2007-03-23  Lawrence Crowl  <crowl@google.com>

	* doc/invoke.texi (Debugging Options): Add
	documentation for the -femit-struct-debug options
	-femit-struct-debug-baseonly, -femit-struct-debug-reduced,
	and -femit-struct-debug-detailed[=...].

	* c-opts.c (c_common_handle_option):
	Add OPT_femit_struct_debug_baseonly,
	OPT_femit_struct_debug_reduced, and
	OPT_femit_struct_debug_detailed_.
	* c.opt: Add specifications for
	-femit-struct-debug-baseonly, -femit-struct-debug-reduced,
	and -femit-struct-debug-detailed[=...].
	* opts.c (set_struct_debug_option): Parse the
	-femit-struct-debug-... options.
	* opts.c (matches_main_base): Add variables
	(main_input_basename, main_input_baselength) and functions
	(base_of_path, matches_main_base) to compare header base
	name to compilation unit base name.
	* opts.c (should_emit_struct_debug): Add a function
	(should_emit_struct_debug) to determine to emit a structure
	based on the option.  Also add a disabled function
	(dump_struct_debug) to debug this function.
	* opts.c (handle_options): Save the base name of the
	compilation unit.

	* langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
        (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add.
	This hook indicates if a type is generic.  Set it by default
	to "never generic".
	* langhooks.h (struct lang_hooks_for_types): Add a new hook
	to determine if a struct type is generic or not.
	* cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
	* cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
	* cp/cp-lang.c: Override null C hook with live C++ hook.

	* flags.h: Add an enumeration to describe a program's use
	of a structure type.
	* dwarf2out.c (gen_struct_or_union_type_die):
	Add a new parameter to indicate the program's usage of
	the type.  Filter structs based on the
	-femit-struct-debug-... specification.
	(gen_type_die): Split into two routines, gen_type_die and
	gen_type_die_with_usage.  gen_type_die is now a wrapper
	that assumes direct usage.
	(gen_type_die_with_usage): Replace calls to gen_type_die
	with gen_type_die_with_usage adding the program usage of
	the referenced type.
	(dwarf2out_imported_module_or_decl): Suppress struct debug
	information using should_emit_struct_debug when appropriate.

[-- Attachment #3: gcc-fesd-testsuite-changelog.txt --]
[-- Type: text/plain, Size: 1462 bytes --]

2007-03-23  Lawrence Crowl  <crowl@google.com>

	* g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
	* g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
	* g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
	* g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
	* g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
	* g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
	* g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
	* g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
	* g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
	* g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
	* g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.

	* gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
	* gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
	* gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
	* gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
	* gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
	* gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
	* gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
	* gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
	* gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
	* gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
	* gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.


[-- Attachment #4: gcc-fesd.patch --]
[-- Type: text/x-patch, Size: 118918 bytes --]

==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c#11 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c#11	2007-03-22 15:01:02.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c-opts.c	2007-03-22 13:19:37.000000000 -0700
@@ -823,6 +823,18 @@
       flag_gen_declaration = 1;
       break;
 
+    case OPT_femit_struct_debug_baseonly:
+      set_struct_debug_option ("base");
+      break;
+
+    case OPT_femit_struct_debug_reduced:
+      set_struct_debug_option ("dir:ord:sys,dir:gen:any,ind:base");
+      break;
+
+    case OPT_femit_struct_debug_detailed_:
+      set_struct_debug_option (arg);
+      break;
+
     case OPT_idirafter:
       add_path (xstrdup (arg), AFTER, 0, true);
       break;
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt#11 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt#11	2007-03-22 15:01:02.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/c.opt	2007-03-22 13:19:58.000000000 -0700
@@ -775,6 +775,18 @@
 ObjC ObjC++
 Dump declarations to a .decl file
 
+femit-struct-debug-baseonly
+C ObjC C++ ObjC++
+-femit-struct-debug-baseonly	Aggressive reduced debug info for structs
+
+femit-struct-debug-reduced
+C ObjC C++ ObjC++
+-femit-struct-debug-reduced	Conservative reduced debug info for structs
+
+femit-struct-debug-detailed=
+C ObjC C++ ObjC++ Joined
+-femit-struct-debug-detailed=<spec-list>	Detailed reduced debug info for structs
+
 idirafter
 C ObjC C++ ObjC++ Joined Separate
 -idirafter <dir>	Add <dir> to the end of the system include path
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c#2 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c#2	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-lang.c	2007-02-02 17:40:31.000000000 -0800
@@ -44,6 +44,8 @@
 #define LANG_HOOKS_NAME "GNU C++"
 #undef LANG_HOOKS_INIT
 #define LANG_HOOKS_INIT cxx_init
+#undef LANG_HOOKS_GENERIC_TYPE_P
+#define LANG_HOOKS_GENERIC_TYPE_P class_tmpl_impl_spec_p
 #undef LANG_HOOKS_DECL_PRINTABLE_NAME
 #define LANG_HOOKS_DECL_PRINTABLE_NAME	cxx_printable_name
 #undef LANG_HOOKS_FOLD_OBJ_TYPE_REF
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h#11 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h#11	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/cp-tree.h	2007-02-02 17:40:31.000000000 -0800
@@ -4384,6 +4384,7 @@
 extern tree cxx_maybe_build_cleanup		(tree);
 extern void init_tree				(void);
 extern int pod_type_p				(tree);
+extern bool class_tmpl_impl_spec_p		(tree);
 extern int zero_init_p				(tree);
 extern tree canonical_type_variant		(tree);
 extern tree copy_binfo				(tree, tree, tree,
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c#3	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/cp/tree.c	2007-02-02 17:40:31.000000000 -0800
@@ -1904,6 +1904,14 @@
   return 1;
 }
 
+/* Nonzero iff type T is a class template implicit specialization.  */
+
+bool
+class_tmpl_impl_spec_p (tree t)
+{
+  return CLASS_TYPE_P (t) && CLASSTYPE_TEMPLATE_INSTANTIATION (t);
+}
+
 /* Returns 1 iff zero initialization of type T means actually storing
    zeros in it.  */
 
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi#39 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi#39	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/doc/invoke.texi	2007-03-22 13:38:50.000000000 -0700
@@ -297,6 +297,8 @@
 -ftest-coverage  -ftime-report -fvar-tracking @gol
 -g  -g@var{level}  -gcoff -gdwarf-2 @gol
 -ggdb  -gstabs  -gstabs+  -gvms  -gxcoff  -gxcoff+ @gol
+-femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
+-femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol
 -p  -pg  -print-file-name=@var{library}  -print-libgcc-file-name @gol
 -print-multi-directory  -print-multi-lib @gol
 -print-prog-name=@var{program}  -print-search-dirs  -Q @gol
@@ -3754,6 +3756,78 @@
 information about each symbol.  This option only makes sense when
 generating DWARF2 debugging information with @option{-gdwarf-2}.
 
+@item -femit-struct-debug-baseonly
+Emit debug information for struct-like types
+only when the base name of the compilation source file
+matches the base name of file in which the struct was defined.
+
+This option substantially reduces the size of debugging information,
+but at significant potential loss in type information to the debugger.
+See @option{-femit-struct-debug-reduced} for a less aggressive option.
+See @option{-femit-struct-debug-detailed} for more detailed control.
+
+This option works only with DWARF 2.
+
+@item -femit-struct-debug-reduced
+Emit debug information for struct-like types
+only when the base name of the compilation source file
+matches the base name of file in which the type was defined,
+unless the struct is a template or defined in a system header.
+
+This option significantly reduces the size of debugging information,
+with some potential loss in type information to the debugger.
+See @option{-femit-struct-debug-baseonly} for a more aggressive option.
+See @option{-femit-struct-debug-detailed} for more detailed control.
+
+This option works only with DWARF 2.
+
+@item -femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]}
+Specify the struct-like types
+for which the compiler will generate debug information.
+The intent is to reduce duplicate struct debug information
+between different object files within the same program.
+
+This option is a detailed version of
+@option{-femit-struct-debug-reduced} and @option{-femit-struct-debug-baseonly},
+which will serve for most needs.
+
+A specification has the syntax
+[@samp{dir:}|@samp{ind:}][@samp{ord:}|@samp{gen:}](@samp{any}|@samp{sys}|@samp{base}|@samp{none})
+
+The optional first word limits the specification to
+structs that are used directly (@samp{dir:}) or used indirectly (@samp{ind:}).
+A struct type is used directly when it is the type of a variable, member.
+Indirect uses arise through pointers to structs.
+That is, when use of an incomplete struct would be legal, the use is indirect.
+An example is
+@samp{struct one direct; struct two * indirect;}.
+
+The optional second word limits the specification to
+ordinary structs (@samp{ord:}) or generic structs (@samp{gen:}).
+Generic structs are a bit complicated to explain.
+For C++, these are non-explicit specializations of template classes,
+or non-template classes within the above.
+Other programming languages have generics,
+but @samp{-femit-struct-debug-detailed} does not yet implement them.
+
+The third word specifies the source files for those
+structs for which the compiler will emit debug information.
+The values @samp{none} and @samp{any} have the normal meaning.
+The value @samp{base} means that
+the base of name of the file in which the type declaration appears
+must match the base of the name of the main compilation file.
+In practice, this means that
+types declared in @file{foo.c} and @file{foo.h} will have debug information,
+but types declared in other header will not.
+The value @samp{sys} means those types satisfying @samp{base}
+or declared in system or compiler headers.
+
+You may need to experiment to determine the best settings for your application.
+
+The default is @samp{-femit-struct-debug-detailed=all}.
+
+This option works only with DWARF 2.
+
 @cindex @command{prof}
 @item -p
 @opindex p
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c#12 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c#12	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/dwarf2out.c	2007-02-20 11:13:32.000000000 -0800
@@ -4214,7 +4214,8 @@
 static dw_die_ref gen_compile_unit_die (const char *);
 static void gen_inheritance_die (tree, tree, dw_die_ref);
 static void gen_member_die (tree, dw_die_ref);
-static void gen_struct_or_union_type_die (tree, dw_die_ref);
+static void gen_struct_or_union_type_die (tree, dw_die_ref,
+						enum debug_info_usage);
 static void gen_subroutine_type_die (tree, dw_die_ref);
 static void gen_typedef_die (tree, dw_die_ref);
 static void gen_type_die (tree, dw_die_ref);
@@ -12501,7 +12502,8 @@
    member DIEs needed by later specification DIEs.  */
 
 static void
-gen_struct_or_union_type_die (tree type, dw_die_ref context_die)
+gen_struct_or_union_type_die (tree type, dw_die_ref context_die,
+				enum debug_info_usage usage)
 {
   dw_die_ref type_die = lookup_type_die (type);
   dw_die_ref scope_die = 0;
@@ -12510,6 +12512,7 @@
 		  && (! TYPE_STUB_DECL (type)
 		      || ! TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (type))));
   int ns_decl = (context_die && context_die->die_tag == DW_TAG_namespace);
+  complete = complete && should_emit_struct_debug (type, usage);
 
   if (type_die && ! complete)
     return;
@@ -12646,7 +12649,8 @@
 /* Generate a type description DIE.  */
 
 static void
-gen_type_die (tree type, dw_die_ref context_die)
+gen_type_die_with_usage (tree type, dw_die_ref context_die,
+				enum debug_info_usage usage)
 {
   int need_pop;
 
@@ -12694,16 +12698,19 @@
 
       /* For these types, all that is required is that we output a DIE (or a
 	 set of DIEs) to represent the "basis" type.  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+				DINFO_USAGE_IND_USE);
       break;
 
     case OFFSET_TYPE:
       /* This code is used for C++ pointer-to-data-member types.
 	 Output a description of the relevant class type.  */
-      gen_type_die (TYPE_OFFSET_BASETYPE (type), context_die);
+      gen_type_die_with_usage (TYPE_OFFSET_BASETYPE (type), context_die,
+					DINFO_USAGE_IND_USE);
 
       /* Output a description of the type of the object pointed to.  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+					DINFO_USAGE_IND_USE);
 
       /* Now output a DIE to represent this pointer-to-data-member type
 	 itself.  */
@@ -12712,13 +12719,15 @@
 
     case FUNCTION_TYPE:
       /* Force out return type (in case it wasn't forced out already).  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+					DINFO_USAGE_DIR_USE);
       gen_subroutine_type_die (type, context_die);
       break;
 
     case METHOD_TYPE:
       /* Force out return type (in case it wasn't forced out already).  */
-      gen_type_die (TREE_TYPE (type), context_die);
+      gen_type_die_with_usage (TREE_TYPE (type), context_die,
+					DINFO_USAGE_DIR_USE);
       gen_subroutine_type_die (type, context_die);
       break;
 
@@ -12744,7 +12753,7 @@
 	  && AGGREGATE_TYPE_P (TYPE_CONTEXT (type))
 	  && ! TREE_ASM_WRITTEN (TYPE_CONTEXT (type)))
 	{
-	  gen_type_die (TYPE_CONTEXT (type), context_die);
+	  gen_type_die_with_usage (TYPE_CONTEXT (type), context_die, usage);
 
 	  if (TREE_ASM_WRITTEN (type))
 	    return;
@@ -12768,7 +12777,7 @@
 	    gen_enumeration_type_die (type, context_die);
 	}
       else
-	gen_struct_or_union_type_die (type, context_die);
+	gen_struct_or_union_type_die (type, context_die, usage);
 
       if (need_pop)
 	pop_decl_scope ();
@@ -12797,6 +12806,12 @@
   TREE_ASM_WRITTEN (type) = 1;
 }
 
+static void
+gen_type_die (tree type, dw_die_ref context_die)
+{
+  gen_type_die_with_usage (type, context_die, DINFO_USAGE_DIR_USE);
+}
+
 /* Generate a DIE for a tagged type instantiation.  */
 
 static void
@@ -13392,7 +13407,11 @@
   if (!context)
     scope_die = comp_unit_die;
   else if (TYPE_P (context))
+    {
+      if (!should_emit_struct_debug (context, DINFO_USAGE_DIR_USE))
+	return;
     scope_die = force_type_die (context);
+    }
   else
     scope_die = force_decl_die (context);
 
@@ -13413,7 +13432,12 @@
 
 	      if (TYPE_CONTEXT (type))
 		if (TYPE_P (TYPE_CONTEXT (type)))
+		  {
+		    if (!should_emit_struct_debug (TYPE_CONTEXT (type),
+						   DINFO_USAGE_DIR_USE))
+		      return;
 		  type_context_die = force_type_die (TYPE_CONTEXT (type));
+		  }
 	      else
 		type_context_die = force_decl_die (TYPE_CONTEXT (type));
 	      else
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h#3	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/flags.h	2007-02-05 13:20:48.000000000 -0800
@@ -23,6 +23,7 @@
 #ifndef GCC_FLAGS_H
 #define GCC_FLAGS_H
 
+#include "coretypes.h"
 #include "options.h"
 
 enum debug_info_type
@@ -54,6 +55,25 @@
 /* Specify how much debugging info to generate.  */
 extern enum debug_info_level debug_info_level;
 
+/* A major contribution to object and executable size is debug
+   information size.  A major contribution to debug information
+   size is struct descriptions replicated in several object files.
+   The following function determines whether or not debug information
+   should be generated for a given struct.  The indirect parameter
+   indicates that the struct is being handled indirectly, via
+   a pointer.  See opts.c for the implementation. */
+
+enum debug_info_usage
+{
+  DINFO_USAGE_DFN,	/* A struct definition. */
+  DINFO_USAGE_DIR_USE,	/* A direct use, such as the type of a variable. */
+  DINFO_USAGE_IND_USE,	/* An indirect use, such as through a pointer. */
+  DINFO_USAGE_NUM_ENUMS	/* The number of enumerators. */
+};
+
+extern bool should_emit_struct_debug (tree type_decl, enum debug_info_usage);
+extern void set_struct_debug_option (const char *value);
+
 /* Nonzero means use GNU-only extensions in the generated symbolic
    debugging information.  */
 extern bool use_gnu_debug_info_extensions;
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h#3	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks-def.h	2007-02-02 17:40:31.000000000 -0800
@@ -216,6 +216,7 @@
    so we create a compile-time error instead.  */
 #define LANG_HOOKS_MAKE_TYPE lhd_make_node
 #define LANG_HOOKS_INCOMPLETE_TYPE_ERROR lhd_incomplete_type_error
+#define LANG_HOOKS_GENERIC_TYPE_P	hook_bool_tree_false
 #define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
 #define LANG_HOOKS_TYPE_MAX_SIZE	lhd_return_null_tree
@@ -230,6 +231,7 @@
   LANG_HOOKS_UNSIGNED_TYPE, \
   LANG_HOOKS_SIGNED_TYPE, \
   LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, \
+  LANG_HOOKS_GENERIC_TYPE_P, \
   LANG_HOOKS_TYPE_PROMOTES_TO, \
   LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
   LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h#3 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h#3	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/langhooks.h	2007-02-02 17:40:31.000000000 -0800
@@ -119,6 +119,10 @@
      according to UNSIGNEDP.  */
   tree (*signed_or_unsigned_type) (int, tree);
 
+  /* True if the type is an instantiation of a generic type,
+     e.g. C++ template implicit specializations.  */
+  bool (*generic_p) (tree);
+
   /* Given a type, apply default promotions to unnamed function
      arguments and return the new type.  Return the same type if no
      change.  Required by any language that supports variadic
==== //depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c#8 - /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c ====
--- /tmp/g4-21482/cache/depot2/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c#8	2007-03-22 15:01:03.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/opts.c	2007-03-13 15:53:35.000000000 -0700
@@ -73,6 +73,256 @@
    the definitions of the different possible levels.  */
 enum debug_info_level debug_info_level = DINFO_LEVEL_NONE;
 
+/* A major contribution to object and executable size is debug
+   information size.  A major contribution to debug information size
+   is struct descriptions replicated in several object files. The
+   following flags attempt to reduce this information.  The basic
+   idea is to not emit struct debugging information in the current
+   compilation unit when that information will be generated by
+   another compilation unit.
+
+   Debug information for a struct defined in the current source
+   file should be generated in the object file.  Likewise the
+   debug information for a struct defined in a header should be
+   generated in the object file of the corresponding source file.
+   Both of these case are handled when the base name of the file of
+   the struct definition matches the base name of the source file
+   of thet current compilation unit.  This matching emits minimal
+   struct debugging information.
+
+   The base file name matching rule above will fail to emit debug
+   information for structs defined in system headers.  So a second
+   category of files includes system headers in addition to files
+   with matching bases.
+
+   The remaining types of files are library headers and application
+   headers.  We cannot currently distinguish these two types.  */
+
+enum debug_struct_file
+{
+  DINFO_STRUCT_FILE_NONE,   /* Debug no structs. */
+  DINFO_STRUCT_FILE_BASE,   /* Debug structs defined in files with the
+                               same base name as the compilation unit. */
+  DINFO_STRUCT_FILE_SYS,    /* Also debug structs defined in system
+                               header files.  */
+  DINFO_STRUCT_FILE_ANY     /* Debug structs defined in all files. */
+};
+
+/* Generic structs (e.g. templates not explicitly specialized)
+   may not have a compilation unit associated with them, and so
+   may need to be treated differently from ordinary structs.
+
+   Structs only handled by reference (indirectly), will also usually
+   not need as much debugging information.  */
+
+static enum debug_struct_file debug_struct_ordinary[DINFO_USAGE_NUM_ENUMS]
+  = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY };
+static enum debug_struct_file debug_struct_generic[DINFO_USAGE_NUM_ENUMS]
+  = { DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY, DINFO_STRUCT_FILE_ANY };
+
+/* Parse the -femit-struct-debug-detailed option value
+   and set the flag variables. */
+
+#define MATCH( prefix, string ) \
+  ((strncmp (prefix, string, sizeof prefix - 1) == 0) \
+   ? ((string += sizeof prefix - 1), 1) : 0)
+
+void
+set_struct_debug_option (const char *spec)
+{
+  /* various labels for comparison */
+  static char dfn_lbl[] = "dfn:", dir_lbl[] = "dir:", ind_lbl[] = "ind:";
+  static char ord_lbl[] = "ord:", gen_lbl[] = "gen:";
+  static char none_lbl[] = "none", any_lbl[] = "any";
+  static char base_lbl[] = "base", sys_lbl[] = "sys";
+
+  enum debug_struct_file files = DINFO_STRUCT_FILE_ANY;
+  /* Default is to apply to as much as possible. */
+  enum debug_info_usage usage = DINFO_USAGE_NUM_ENUMS;
+  int ord = 1, gen = 1;
+
+  /* What usage? */
+  if (MATCH (dfn_lbl, spec))
+    usage = DINFO_USAGE_DFN;
+  else if (MATCH (dir_lbl, spec))
+    usage = DINFO_USAGE_DIR_USE;
+  else if (MATCH (ind_lbl, spec))
+    usage = DINFO_USAGE_IND_USE;
+
+  /* Generics or not? */
+  if (MATCH (ord_lbl, spec))
+    gen = 0;
+  else if (MATCH (gen_lbl, spec))
+    ord = 0;
+
+  /* What allowable environment? */
+  if (MATCH (none_lbl, spec))
+    files = DINFO_STRUCT_FILE_NONE;
+  else if (MATCH (any_lbl, spec))
+    files = DINFO_STRUCT_FILE_ANY;
+  else if (MATCH (sys_lbl, spec))
+    files = DINFO_STRUCT_FILE_SYS;
+  else if (MATCH (base_lbl, spec))
+    files = DINFO_STRUCT_FILE_BASE;
+  else
+    error ("argument %qs to %<-femit-struct-debug-detailed%> not recognized",
+           spec);
+
+  /* Effect the specification. */
+  if (usage == DINFO_USAGE_NUM_ENUMS)
+    {
+      if (ord)
+        {
+          debug_struct_ordinary[DINFO_USAGE_DFN] = files;
+          debug_struct_ordinary[DINFO_USAGE_DIR_USE] = files;
+          debug_struct_ordinary[DINFO_USAGE_IND_USE] = files;
+        }
+      if (gen)
+        {
+          debug_struct_generic[DINFO_USAGE_DFN] = files;
+          debug_struct_generic[DINFO_USAGE_DIR_USE] = files;
+          debug_struct_generic[DINFO_USAGE_IND_USE] = files;
+        }
+    }
+  else
+    {
+      if (ord)
+        debug_struct_ordinary[usage] = files;
+      if (gen)
+        debug_struct_generic[usage] = files;
+    }
+
+  if (*spec == ',')
+    set_struct_debug_option (spec+1);
+  else
+    {
+      /* No more -femit-struct-debug-detailed specifications.
+         Do final checks. */
+      if (*spec != '\0')
+	error ("argument %qs to %<-femit-struct-debug-detailed%> unknown",
+               spec);
+      if (debug_struct_ordinary[DINFO_USAGE_DIR_USE]
+		< debug_struct_ordinary[DINFO_USAGE_IND_USE]
+	  || debug_struct_generic[DINFO_USAGE_DIR_USE]
+		< debug_struct_generic[DINFO_USAGE_IND_USE])
+	error ("%<-femit-struct-debug-detailed=dir:...%> must allow at least"
+               " as much as %<-femit-struct-debug-detailed=ind:...%>");
+    }
+}
+
+/* Find the base name of a path, stripping off both directories and
+   a single final extension. */
+static int
+base_of_path (const char *path, const char **base_out)
+{
+  const char *base = path;
+  const char *dot = 0;
+  const char *p = path;
+  char c = *p;
+  while (c)
+    {
+      if (IS_DIR_SEPARATOR(c))
+        {
+          base = p + 1;
+          dot = 0;
+        }
+      else if (c == '.')
+        dot = p;
+      c = *++p;
+    }
+  if (!dot)
+    dot = p;
+  *base_out = base;
+  return dot - base;
+}
+
+/* Match the base name of a file to the base name of a compilation unit. */
+
+static const char *main_input_basename;
+static int main_input_baselength;
+
+static int
+matches_main_base (const char *path)
+{
+  /* Cache the last query. */
+  static const char *last_path = NULL;
+  static int last_match = 0;
+  if (path != last_path)
+    {
+      const char *base;
+      int length = base_of_path (path, &base);
+      last_path = path;
+      last_match = (length == main_input_baselength
+                    && memcmp (base, main_input_basename, length) == 0);
+    }
+  return last_match;
+}
+
+#ifdef DEBUG_DEBUG_STRUCT
+
+static int
+dump_struct_debug (tree type, enum debug_info_usage usage,
+		   enum debug_struct_file criterion, int generic,
+		   int matches, int result)
+{
+  /* Find the type name. */
+  tree type_decl = TYPE_STUB_DECL (type);
+  tree t = type_decl;
+  const char *name = 0;
+  if (TREE_CODE (t) == TYPE_DECL)
+    t = DECL_NAME (t);
+  if (t)
+    name = IDENTIFIER_POINTER (t);
+
+  fprintf (stderr, "	struct %d %s %s %s %s %d %p %s\n",
+	   criterion,
+           DECL_IN_SYSTEM_HEADER (type_decl) ? "sys" : "usr",
+           matches ? "bas" : "hdr",
+           generic ? "gen" : "ord",
+           usage == DINFO_USAGE_DFN ? ";" :
+             usage == DINFO_USAGE_DIR_USE ? "." : "*",
+           result,
+           (void*) type_decl, name);
+  return result;
+}
+#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result) \
+  dump_struct_debug (type, usage, criterion, generic, matches, result)
+
+#else
+
+#define DUMP_GSTRUCT(type, usage, criterion, generic, matches, result) \
+  (result)
+
+#endif
+
+
+bool
+should_emit_struct_debug (tree type, enum debug_info_usage usage)
+{
+  enum debug_struct_file criterion;
+  tree type_decl;
+  bool generic = lang_hooks.types.generic_p (type);
+
+  if (generic)
+    criterion = debug_struct_generic[usage];
+  else
+    criterion = debug_struct_ordinary[usage];
+
+  if (criterion == DINFO_STRUCT_FILE_NONE)
+    return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
+  if (criterion == DINFO_STRUCT_FILE_ANY)
+    return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
+
+  type_decl = TYPE_STUB_DECL (type);
+
+  if (criterion == DINFO_STRUCT_FILE_SYS && DECL_IN_SYSTEM_HEADER (type_decl))
+    return DUMP_GSTRUCT (type, usage, criterion, generic, false, true);
+
+  if (matches_main_base (DECL_SOURCE_FILE (type_decl)))
+    return DUMP_GSTRUCT (type, usage, criterion, generic, true, true);
+  return DUMP_GSTRUCT (type, usage, criterion, generic, false, false);
+}
+
 /* Nonzero means use GNU-only extensions in the generated symbolic
    debugging information.  Currently, this only has an effect when
    write_symbols is set to DBX_DEBUG, XCOFF_DEBUG, or DWARF_DEBUG.  */
@@ -364,7 +614,11 @@
       if (opt[0] != '-' || opt[1] == '\0')
 	{
 	  if (main_input_filename == NULL)
+	    {
 	    main_input_filename = opt;
+	      main_input_baselength
+		= base_of_path (main_input_filename, &main_input_basename);
+	    }
 	  add_input_filename (opt);
 	  n = 1;
 	  continue;
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-any.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-any.C	2007-03-16 15:40:17.000000000 -0700
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=any" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "fesd-any.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-any.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-any.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-any.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-any.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-any.h	2007-03-15 16:19:27.000000000 -0700
@@ -0,0 +1,42 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-baseonly.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-baseonly.C	2007-03-22 13:43:37.000000000 -0700
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-baseonly" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "fesd-baseonly.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-baseonly.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-baseonly.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-baseonly.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-baseonly.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-baseonly.h	2007-03-22 13:41:43.000000000 -0700
@@ -0,0 +1,42 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-none.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-none.C	2007-03-16 15:40:29.000000000 -0700
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=none" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "fesd-none.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-none.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-none.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-none.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-none.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-none.h	2007-03-15 16:19:52.000000000 -0700
@@ -0,0 +1,42 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-reduced.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-reduced.C	2007-03-16 15:40:37.000000000 -0700
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-reduced" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "fesd-reduced.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-reduced.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-reduced.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-reduced.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-reduced.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-reduced.h	2007-03-15 16:20:05.000000000 -0700
@@ -0,0 +1,42 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-sys.C ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-sys.C	2007-03-16 15:40:43.000000000 -0700
@@ -0,0 +1,126 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=sys" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_fld_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_decl_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ref_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_tmpl_defn_ptr_head<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_fld_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_var_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_tmpl_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_tmpl_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_decl_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ref_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_tmpl_defn_ptr_base<int>.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_tmpl_defn_ptr_base.*DW_AT_name" } }
+# 1 "fesd-sys.C"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-sys.C"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-sys.C" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-sys.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+struct gstruct_head_tmpl_defn_var_base< int > base_var5;
+struct gstruct_base_tmpl_defn_var_base< int > base_var6;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
++ base_var5.field_head_tmpl_defn_var_base
++ base_var6.field1_base_tmpl_defn_var_base_ptr->field_head_tmpl_defn_ptr_base
++ base_var6.field1_base_tmpl_defn_var_base_fld.field_head_tmpl_defn_fld_base
++ base_var6.field2_base_tmpl_defn_var_base_ptr->field_base_tmpl_defn_ptr_base
++ base_var6.field2_base_tmpl_defn_var_base_fld.field_base_tmpl_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-sys.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd-sys.h	2007-03-15 16:20:15.000000000 -0700
@@ -0,0 +1,42 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
+
+template< typename T > struct gstruct_base_tmpl_decl_not;
+template< typename T > struct gstruct_base_tmpl_defn_not
+{ int field_base_tmpl_defn_not; };
+
+template< typename T > struct gstruct_base_tmpl_decl_ref_base;
+template< typename T > struct gstruct_base_tmpl_defn_ref_base
+{ int field_base_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_base_tmpl_defn_ptr_base
+{ int field_base_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_base_tmpl_defn_fld_base
+{ int field_base_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_base_tmpl_defn_var_base {
+    gstruct_head_tmpl_decl_ref_base< T > *field1_base_tmpl_defn_var_base_inc;
+    gstruct_head_tmpl_defn_ref_base< T > *field1_base_tmpl_defn_var_base_ref;
+    gstruct_head_tmpl_defn_ptr_base< T > *field1_base_tmpl_defn_var_base_ptr;
+    gstruct_head_tmpl_defn_fld_base< T >  field1_base_tmpl_defn_var_base_fld;
+    gstruct_base_tmpl_decl_ref_base< T > *field2_base_tmpl_defn_var_base_inc;
+    gstruct_base_tmpl_defn_ref_base< T > *field2_base_tmpl_defn_var_base_ref;
+    gstruct_base_tmpl_defn_ptr_base< T > *field2_base_tmpl_defn_var_base_ptr;
+    gstruct_base_tmpl_defn_fld_base< T >  field2_base_tmpl_defn_var_base_fld;
+};
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/g++.dg/other/fesd.h	2007-03-15 16:18:47.000000000 -0700
@@ -0,0 +1,67 @@
+/*
+where from: base = matching base; head = other header
+what kind:  ordy = ordinary struct; tmpl = template struct
+definition: decl = incomplete declaration; defn = full definition
+how used:   not = not used; ref = by ref; ptr = through pointer;
+            fld = as field; var = as variable
+from where: base = from base; head = other header
+*/
+
+struct gstruct_head_ordy_decl_not;
+struct gstruct_head_ordy_defn_not { int field_head_ordy_defn_not; };
+
+struct gstruct_head_ordy_decl_ref_head;
+struct gstruct_head_ordy_defn_ref_head { int field_head_ordy_defn_ref_head; };
+struct gstruct_head_ordy_defn_ptr_head { int field_head_ordy_defn_ptr_head; };
+struct gstruct_head_ordy_defn_fld_head { int field_head_ordy_defn_fld_head; };
+struct gstruct_head_ordy_defn_var_head {
+    gstruct_head_ordy_decl_ref_head *field_head_ordy_defn_var_head_inc;
+    gstruct_head_ordy_defn_ref_head *field_head_ordy_defn_var_head_ref;
+    gstruct_head_ordy_defn_ptr_head *field_head_ordy_defn_var_head_ptr;
+    gstruct_head_ordy_defn_fld_head  field_head_ordy_defn_var_head_fld;
+};
+extern struct gstruct_head_ordy_defn_var_head head_var1;
+
+struct gstruct_head_ordy_decl_ref_base;
+struct gstruct_head_ordy_defn_ref_base { int field_head_ordy_defn_ref_base; };
+struct gstruct_head_ordy_defn_ptr_base { int field_head_ordy_defn_ptr_base; };
+struct gstruct_head_ordy_defn_fld_base { int field_head_ordy_defn_fld_base; };
+struct gstruct_head_ordy_defn_var_base { int field_head_ordy_defn_var_base; };
+
+template< typename T > struct gstruct_head_tmpl_decl_not;
+template< typename T > struct gstruct_head_tmpl_defn_not
+{ T field_head_tmpl_defn_not; };
+
+template< typename T > struct gstruct_head_tmpl_decl_ref_head;
+template< typename T > struct gstruct_head_tmpl_defn_ref_head
+{ T field_head_tmpl_defn_ref_head; };
+template< typename T > struct gstruct_head_tmpl_defn_ptr_head
+{ T field_head_tmpl_defn_ptr_head; };
+template< typename T > struct gstruct_head_tmpl_defn_fld_head
+{ T field_head_tmpl_defn_fld_head; };
+template< typename T > struct gstruct_head_tmpl_defn_var_head {
+    gstruct_head_tmpl_decl_ref_head< T > *field_head_tmpl_defn_var_head_inc;
+    gstruct_head_tmpl_defn_ref_head< T > *field_head_tmpl_defn_var_head_ref;
+    gstruct_head_tmpl_defn_ptr_head< T > *field_head_tmpl_defn_var_head_ptr;
+    gstruct_head_tmpl_defn_fld_head< T >  field_head_tmpl_defn_var_head_fld;
+};
+extern gstruct_head_tmpl_defn_var_head< int > head_var5;
+
+template< typename T > struct gstruct_head_tmpl_decl_ref_base;
+template< typename T > struct gstruct_head_tmpl_defn_ref_base
+{ T field_head_tmpl_defn_ref_base; };
+template< typename T > struct gstruct_head_tmpl_defn_ptr_base
+{ T field_head_tmpl_defn_ptr_base; };
+template< typename T > struct gstruct_head_tmpl_defn_fld_base
+{ T field_head_tmpl_defn_fld_base; };
+template< typename T > struct gstruct_head_tmpl_defn_var_base
+{ T field_head_tmpl_defn_var_base; };
+
+inline int head_function() {
+    return 0
++ head_var1.field_head_ordy_defn_var_head_ptr->field_head_ordy_defn_ptr_head
++ head_var1.field_head_ordy_defn_var_head_fld.field_head_ordy_defn_fld_head
++ head_var5.field_head_tmpl_defn_var_head_ptr->field_head_tmpl_defn_ptr_head
++ head_var5.field_head_tmpl_defn_var_head_fld.field_head_tmpl_defn_fld_head
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-any.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-any.c	2007-03-22 13:46:43.000000000 -0700
@@ -0,0 +1,84 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=any" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "fesd-any.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-any.c"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-any.c" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-any.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-any.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-any.h	2007-03-15 16:14:21.000000000 -0700
@@ -0,0 +1,19 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-baseonly.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-baseonly.c	2007-03-22 13:46:05.000000000 -0700
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-baseonly" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "fesd-baseonly.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-baseonly.c"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-baseonly.c" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-baseonly.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-baseonly.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-baseonly.h	2007-03-15 16:14:59.000000000 -0700
@@ -0,0 +1,19 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-none.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-none.c	2007-03-22 13:46:48.000000000 -0700
@@ -0,0 +1,84 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=none" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "fesd-none.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-none.c"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-none.c" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-none.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
+
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-none.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-none.h	2007-03-15 16:15:17.000000000 -0700
@@ -0,0 +1,19 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-reduced.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-reduced.c	2007-03-22 13:46:54.000000000 -0700
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-reduced" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "fesd-reduced.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-reduced.c"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-reduced.c" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-reduced.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-reduced.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-reduced.h	2007-03-15 16:15:52.000000000 -0700
@@ -0,0 +1,19 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-sys.c ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-sys.c	2007-03-22 13:46:59.000000000 -0700
@@ -0,0 +1,83 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=sys" }
+// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
+// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
+// { dg-final { scan-assembler "itimerspec.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_interval.*DW_AT_name" } }
+// { dg-final { scan-assembler "it_value.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_head.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_head_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "gstruct_head_ordy_decl_ref_head.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler-not "field_head_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_ptr_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field_base_ordy_defn_fld_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_defn_var_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field1_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_inc.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ref.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_ptr.*DW_AT_name" } }
+// { dg-final { scan-assembler "field2_base_ordy_defn_var_base_fld.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_head_ordy_decl_ref_base.*DW_AT_name" } }
+// { dg-final { scan-assembler "gstruct_base_ordy_decl_ref_base.*DW_AT_name" } }
+# 1 "fesd-sys.c"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "fesd-sys.c"
+
+//#include "time.h"
+# 1 "time.h" 1 3 4
+struct timespec
+  {
+    long int tv_sec;
+    long int tv_nsec;
+  };
+
+struct itimerspec
+  {
+    struct timespec it_interval;
+    struct timespec it_value;
+  };
+
+# 6 "fesd-sys.c" 2
+
+struct timespec base_var8;
+struct itimerspec *base_var9;
+
+#include "fesd-sys.h"
+
+struct gstruct_head_ordy_defn_var_base base_var1;
+struct gstruct_base_ordy_defn_var_base base_var2;
+
+int base_function() {
+    return 0
++ base_var1.field_head_ordy_defn_var_base
++ base_var2.field1_base_ordy_defn_var_base_ptr->field_head_ordy_defn_ptr_base
++ base_var2.field1_base_ordy_defn_var_base_fld.field_head_ordy_defn_fld_base
++ base_var2.field2_base_ordy_defn_var_base_ptr->field_base_ordy_defn_ptr_base
++ base_var2.field2_base_ordy_defn_var_base_fld.field_base_ordy_defn_fld_base
+;
+}
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-sys.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd-sys.h	2007-03-15 16:16:05.000000000 -0700
@@ -0,0 +1,19 @@
+#include "fesd.h"
+
+struct gstruct_base_ordy_decl_not;
+struct gstruct_base_ordy_defn_not { int field_base_ordy_defn_not; };
+
+struct gstruct_base_ordy_decl_ref_base;
+struct gstruct_base_ordy_defn_ref_base { int field_base_ordy_defn_ref_base; };
+struct gstruct_base_ordy_defn_ptr_base { int field_base_ordy_defn_ptr_base; };
+struct gstruct_base_ordy_defn_fld_base { int field_base_ordy_defn_fld_base; };
+struct gstruct_base_ordy_defn_var_base {
+    struct gstruct_head_ordy_decl_ref_base *field1_base_ordy_defn_var_base_inc;
+    struct gstruct_head_ordy_defn_ref_base *field1_base_ordy_defn_var_base_ref;
+    struct gstruct_head_ordy_defn_ptr_base *field1_base_ordy_defn_var_base_ptr;
+    struct gstruct_head_ordy_defn_fld_base  field1_base_ordy_defn_var_base_fld;
+    struct gstruct_base_ordy_decl_ref_base *field2_base_ordy_defn_var_base_inc;
+    struct gstruct_base_ordy_defn_ref_base *field2_base_ordy_defn_var_base_ref;
+    struct gstruct_base_ordy_defn_ptr_base *field2_base_ordy_defn_var_base_ptr;
+    struct gstruct_base_ordy_defn_fld_base  field2_base_ordy_defn_var_base_fld;
+};
==== (added) /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd.h ====
--- /dev/null	2006-05-22 07:25:23.000000000 -0700
+++ /usr/local/google/crowl/gstruct/gccsrc-update/gcctools/google_vendor_src_branch/gcc/trunk/gcc/testsuite/gcc.dg/fesd.h	2007-03-15 16:12:16.000000000 -0700
@@ -0,0 +1,36 @@
+/*
+where from: base = matching base; head = other header
+what kind:  ordy = ordinary struct; tmpl = template struct
+definition: decl = incomplete declaration; defn = full definition
+how used:   not = not used; ref = by ref; ptr = through pointer;
+            fld = as field; var = as variable
+from where: base = from base; head = other header
+*/
+
+struct gstruct_head_ordy_decl_not;
+struct gstruct_head_ordy_defn_not { int field_head_ordy_defn_not; };
+
+struct gstruct_head_ordy_decl_ref_head;
+struct gstruct_head_ordy_defn_ref_head { int field_head_ordy_defn_ref_head; };
+struct gstruct_head_ordy_defn_ptr_head { int field_head_ordy_defn_ptr_head; };
+struct gstruct_head_ordy_defn_fld_head { int field_head_ordy_defn_fld_head; };
+struct gstruct_head_ordy_defn_var_head {
+    struct gstruct_head_ordy_decl_ref_head *field_head_ordy_defn_var_head_inc;
+    struct gstruct_head_ordy_defn_ref_head *field_head_ordy_defn_var_head_ref;
+    struct gstruct_head_ordy_defn_ptr_head *field_head_ordy_defn_var_head_ptr;
+    struct gstruct_head_ordy_defn_fld_head  field_head_ordy_defn_var_head_fld;
+};
+extern struct gstruct_head_ordy_defn_var_head head_var1;
+
+struct gstruct_head_ordy_decl_ref_base;
+struct gstruct_head_ordy_defn_ref_base { int field_head_ordy_defn_ref_base; };
+struct gstruct_head_ordy_defn_ptr_base { int field_head_ordy_defn_ptr_base; };
+struct gstruct_head_ordy_defn_fld_base { int field_head_ordy_defn_fld_base; };
+struct gstruct_head_ordy_defn_var_base { int field_head_ordy_defn_var_base; };
+
+inline int head_function() {
+    return 0
++ head_var1.field_head_ordy_defn_var_head_ptr->field_head_ordy_defn_ptr_head
++ head_var1.field_head_ordy_defn_var_head_fld.field_head_ordy_defn_fld_head
+;
+}

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-23 21:05     ` Lawrence Crowl
@ 2007-04-05 16:32       ` Ian Lance Taylor
  2007-04-06  0:15         ` Daniel Jacobowitz
  2007-05-06  1:55         ` Andrew Pinski
  2007-04-17  7:27       ` Ian Lance Taylor
  1 sibling, 2 replies; 61+ messages in thread
From: Ian Lance Taylor @ 2007-04-05 16:32 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

"Lawrence Crowl" <crowl@google.com> writes:

> 2007-03-23  Lawrence Crowl  <crowl@google.com>
> 
> 	* doc/invoke.texi (Debugging Options): Add
> 	documentation for the -femit-struct-debug options
> 	-femit-struct-debug-baseonly, -femit-struct-debug-reduced,
> 	and -femit-struct-debug-detailed[=...].
> 
> 	* c-opts.c (c_common_handle_option):
> 	Add OPT_femit_struct_debug_baseonly,
> 	OPT_femit_struct_debug_reduced, and
> 	OPT_femit_struct_debug_detailed_.
> 	* c.opt: Add specifications for
> 	-femit-struct-debug-baseonly, -femit-struct-debug-reduced,
> 	and -femit-struct-debug-detailed[=...].
> 	* opts.c (set_struct_debug_option): Parse the
> 	-femit-struct-debug-... options.
> 	* opts.c (matches_main_base): Add variables
> 	(main_input_basename, main_input_baselength) and functions
> 	(base_of_path, matches_main_base) to compare header base
> 	name to compilation unit base name.
> 	* opts.c (should_emit_struct_debug): Add a function
> 	(should_emit_struct_debug) to determine to emit a structure
> 	based on the option.  Also add a disabled function
> 	(dump_struct_debug) to debug this function.
> 	* opts.c (handle_options): Save the base name of the
> 	compilation unit.
> 
> 	* langhooks-def.h (LANG_HOOKS_GENERIC_TYPE_P): Define.
>         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add.
> 	This hook indicates if a type is generic.  Set it by default
> 	to "never generic".
> 	* langhooks.h (struct lang_hooks_for_types): Add a new hook
> 	to determine if a struct type is generic or not.
> 	* cp/cp-tree.h (class_tmpl_impl_spec_p): Declare a C++ hook.
> 	* cp/tree.c (class_tmpl_impl_spec_p): Implement the C++ hook.
> 	* cp/cp-lang.c: Override null C hook with live C++ hook.
> 
> 	* flags.h: Add an enumeration to describe a program's use
> 	of a structure type.
> 	* dwarf2out.c (gen_struct_or_union_type_die):
> 	Add a new parameter to indicate the program's usage of
> 	the type.  Filter structs based on the
> 	-femit-struct-debug-... specification.
> 	(gen_type_die): Split into two routines, gen_type_die and
> 	gen_type_die_with_usage.  gen_type_die is now a wrapper
> 	that assumes direct usage.
> 	(gen_type_die_with_usage): Replace calls to gen_type_die
> 	with gen_type_die_with_usage adding the program usage of
> 	the referenced type.
> 	(dwarf2out_imported_module_or_decl): Suppress struct debug
> 	information using should_emit_struct_debug when appropriate.
> 
> 2007-03-23  Lawrence Crowl  <crowl@google.com>
> 
> 	* g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
> 	* g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
> 	* g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
> 	* g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> 	* g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
> 	* g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
> 	* g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
> 	* g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
> 	* g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
> 	* g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> 	* g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.
> 
> 	* gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
> 	* gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
> 	* gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
> 	* gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> 	* gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
> 	* gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
> 	* gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
> 	* gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
> 	* gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
> 	* gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> 	* gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.


There haven't been any comments on this patch since Lawrence
resubmitted it almost two weeks ago.  The C/C++ frontend bits are very
minor.  I'm going to approve this patch unless somebody says something
in the next couple of days.  Please let me know if this seems
inappropriate or if it needs another look.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-04-05 16:32       ` Ian Lance Taylor
@ 2007-04-06  0:15         ` Daniel Jacobowitz
  2007-05-06  1:55         ` Andrew Pinski
  1 sibling, 0 replies; 61+ messages in thread
From: Daniel Jacobowitz @ 2007-04-06  0:15 UTC (permalink / raw)
  To: gcc-patches

On Thu, Apr 05, 2007 at 09:32:17AM -0700, Ian Lance Taylor wrote:
> There haven't been any comments on this patch since Lawrence
> resubmitted it almost two weeks ago.  The C/C++ frontend bits are very
> minor.  I'm going to approve this patch unless somebody says something
> in the next couple of days.  Please let me know if this seems
> inappropriate or if it needs another look.

FWIW, that seems reasonable to me.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-23 21:05     ` Lawrence Crowl
  2007-04-05 16:32       ` Ian Lance Taylor
@ 2007-04-17  7:27       ` Ian Lance Taylor
  1 sibling, 0 replies; 61+ messages in thread
From: Ian Lance Taylor @ 2007-04-17  7:27 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: gcc-patches

"Lawrence Crowl" <crowl@google.com> writes:

> The basic idea is to not emit struct debugging information in the
> current compilation unit when that information will be generated
> by another compilation unit.  The primary criteria is whether the
> base name of the file containing the struct definition matches the
> base name of the main file being compiled.  For example, if struct
> foo is defined in bar.h, then when used in bar.c, the compiler will
> generate the struct debugging information.  On the other hand, when
> used in ping.c, the compiler will not generate the information.
> In simple terms, the option matches the filename of the header
> defining the struct to the filename of the compilation unit.

I have committed this patch.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-04-05 16:32       ` Ian Lance Taylor
  2007-04-06  0:15         ` Daniel Jacobowitz
@ 2007-05-06  1:55         ` Andrew Pinski
  2007-05-08 23:48           ` Lawrence Crowl
  1 sibling, 1 reply; 61+ messages in thread
From: Andrew Pinski @ 2007-05-06  1:55 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Lawrence Crowl, gcc-patches

On 05 Apr 2007 09:32:17 -0700, Ian Lance Taylor <iant@google.com> wrote:

> > 2007-03-23  Lawrence Crowl  <crowl@google.com>
> >
> >       * g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
> >       * g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
> >       * g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
> >       * g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> >       * g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
> >       * g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
> >       * g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
> >       * g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
> >       * g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
> >       * g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> >       * g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.
> >
> >       * gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
> >       * gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
> >       * gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
> >       * gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> >       * gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
> >       * gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
> >       * gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
> >       * gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
> >       * gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
> >       * gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> >       * gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.

Can the gcc.dg tests be at least moved to gcc.dg/debug/dwarf2
directory so they don't produce false failings on targets which don't
support dwarf2?  The g++.dg tests should have been placed in
g++.dg/debug too.

Sorry for not noticing this sooner.

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-05-06  1:55         ` Andrew Pinski
@ 2007-05-08 23:48           ` Lawrence Crowl
  2007-05-08 23:56             ` Andrew Pinski
  0 siblings, 1 reply; 61+ messages in thread
From: Lawrence Crowl @ 2007-05-08 23:48 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Ian Lance Taylor, gcc-patches

On 5/5/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On 05 Apr 2007 09:32:17 -0700, Ian Lance Taylor <iant@google.com> wrote:
>
> > > 2007-03-23  Lawrence Crowl  <crowl@google.com>
> > >
> > >       * g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
> > >       * g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
> > >       * g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
> > >       * g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> > >       * g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
> > >       * g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
> > >       * g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
> > >       * g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
> > >       * g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
> > >       * g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> > >       * g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.
> > >
> > >       * gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
> > >       * gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
> > >       * gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
> > >       * gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> > >       * gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
> > >       * gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
> > >       * gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
> > >       * gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
> > >       * gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
> > >       * gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> > >       * gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.
>
> Can the gcc.dg tests be at least moved to gcc.dg/debug/dwarf2
> directory so they don't produce false failings on targets which don't
> support dwarf2?  The g++.dg tests should have been placed in
> g++.dg/debug too.
>
> Sorry for not noticing this sooner.

I didn't put the tests in the debug areas originally because their .exp
files do too much for my tests.

Perhaps a workable solution is to add

    { dg-require-effective-target dwarf2 }

to the tests.  This line appears to require adding a

proc check_effective_target_dwarf2 { } {
    .... insert magic here ....
}

into lib/target-supports.exp.  As you might guess, I'm having
a little trouble with the magic part.  The two compilation
constraints that might work are recognition of the -gdwarf-2
option or the presence of the .debug_info section.

Is this approach viable?  Which recognition option might
work better?

-- 
Lawrence Crowl

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-05-08 23:48           ` Lawrence Crowl
@ 2007-05-08 23:56             ` Andrew Pinski
  2007-05-17 21:39               ` Andrew Pinski
  0 siblings, 1 reply; 61+ messages in thread
From: Andrew Pinski @ 2007-05-08 23:56 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: Ian Lance Taylor, gcc-patches

On 5/8/07, Lawrence Crowl <crowl@google.com> wrote:
> On 5/5/07, Andrew Pinski <pinskia@gmail.com> wrote:
> > On 05 Apr 2007 09:32:17 -0700, Ian Lance Taylor <iant@google.com> wrote:
> >
> > > > 2007-03-23  Lawrence Crowl  <crowl@google.com>
> > > >
> > > >       * g++.dg/other/fesd-any.C: Test -femit-struct-debug-detailed=any.
> > > >       * g++.dg/other/fesd-any.h: Test -femit-struct-debug-detailed=any.
> > > >       * g++.dg/other/fesd-baseonly.C: Test -femit-struct-debug-baseonly.
> > > >       * g++.dg/other/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> > > >       * g++.dg/other/fesd-none.C: Test -femit-struct-debug-detailed=none.
> > > >       * g++.dg/other/fesd-none.h: Test -femit-struct-debug-detailed=none.
> > > >       * g++.dg/other/fesd-reduced.C: Test -femit-struct-debug-reduced.
> > > >       * g++.dg/other/fesd-reduced.h: Test -femit-struct-debug-reduced.
> > > >       * g++.dg/other/fesd-sys.C: Test -femit-struct-debug-detailed=sys.
> > > >       * g++.dg/other/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> > > >       * g++.dg/other/fesd.h: Common to -femit-struct-debug-... tests.
> > > >
> > > >       * gcc.dg/fesd-any.c: Test -femit-struct-debug-detailed=any.
> > > >       * gcc.dg/fesd-any.h: Test -femit-struct-debug-detailed=any.
> > > >       * gcc.dg/fesd-baseonly.c: Test -femit-struct-debug-baseonly.
> > > >       * gcc.dg/fesd-baseonly.h: Test -femit-struct-debug-baseonly.
> > > >       * gcc.dg/fesd-none.c: Test -femit-struct-debug-detailed=none.
> > > >       * gcc.dg/fesd-none.h: Test -femit-struct-debug-detailed=none.
> > > >       * gcc.dg/fesd-reduced.c: Test -femit-struct-debug-reduced.
> > > >       * gcc.dg/fesd-reduced.h: Test -femit-struct-debug-reduced.
> > > >       * gcc.dg/fesd-sys.c: Test -femit-struct-debug-detailed=sys.
> > > >       * gcc.dg/fesd-sys.h: Test -femit-struct-debug-detailed=sys.
> > > >       * gcc.dg/fesd.h: Common to -femit-struct-debug-... tests.
> >
> > Can the gcc.dg tests be at least moved to gcc.dg/debug/dwarf2
> > directory so they don't produce false failings on targets which don't
> > support dwarf2?  The g++.dg tests should have been placed in
> > g++.dg/debug too.
> >
> > Sorry for not noticing this sooner.
>
> I didn't put the tests in the debug areas originally because their .exp
> files do too much for my tests.

gcc.dg/debug/dwarf2 does not test too much, it only tests -gdwarf-2 (I
just checked dwarf2.exp).
Though g++.dg/debug tests the different debugging styles, you could
have added a g++.dg/debug /dwarf2 testsuite while adding the testcases
and copied what
gcc.dg/debug/dwarf2 does.  It is not like you can't change the
structure of tests in general.

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-05-08 23:56             ` Andrew Pinski
@ 2007-05-17 21:39               ` Andrew Pinski
  2007-05-18  0:01                 ` Lawrence Crowl
  0 siblings, 1 reply; 61+ messages in thread
From: Andrew Pinski @ 2007-05-17 21:39 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: Ian Lance Taylor, gcc-patches

On 5/8/07, Andrew Pinski <pinskia@gmail.com> wrote:
> > I didn't put the tests in the debug areas originally because their .exp
> > files do too much for my tests.
>
> gcc.dg/debug/dwarf2 does not test too much, it only tests -gdwarf-2 (I
> just checked dwarf2.exp).
> Though g++.dg/debug tests the different debugging styles, you could
> have added a g++.dg/debug /dwarf2 testsuite while adding the testcases
> and copied what
> gcc.dg/debug/dwarf2 does.  It is not like you can't change the
> structure of tests in general.

Any progress on this?  Or do I have to write this change myself to
make sure we don't get extra failures on targets which don't support
dwarf2 yet?

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-05-17 21:39               ` Andrew Pinski
@ 2007-05-18  0:01                 ` Lawrence Crowl
  2007-07-22  9:17                   ` Andrew Pinski
  0 siblings, 1 reply; 61+ messages in thread
From: Lawrence Crowl @ 2007-05-18  0:01 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Ian Lance Taylor, gcc-patches

On 5/17/07, Andrew Pinski <pinskia@gmail.com> wrote:
> On 5/8/07, Andrew Pinski <pinskia@gmail.com> wrote:
> > > I didn't put the tests in the debug areas originally because their .exp
> > > files do too much for my tests.
> >
> > gcc.dg/debug/dwarf2 does not test too much, it only tests -gdwarf-2 (I
> > just checked dwarf2.exp).
> > Though g++.dg/debug tests the different debugging styles, you could
> > have added a g++.dg/debug /dwarf2 testsuite while adding the testcases
> > and copied what
> > gcc.dg/debug/dwarf2 does.  It is not like you can't change the
> > structure of tests in general.
>
> Any progress on this?  Or do I have to write this change myself to
> make sure we don't get extra failures on targets which don't support
> dwarf2 yet?

I've been looking at the problem, but progress has been admittedly
slow because of other duties and my inexperience with the test setup.
What would you like?

-- 
Lawrence Crowl

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-05-18  0:01                 ` Lawrence Crowl
@ 2007-07-22  9:17                   ` Andrew Pinski
  0 siblings, 0 replies; 61+ messages in thread
From: Andrew Pinski @ 2007-07-22  9:17 UTC (permalink / raw)
  To: Lawrence Crowl; +Cc: Ian Lance Taylor, gcc-patches

On 5/17/07, Lawrence Crowl <crowl@google.com> wrote:
> I've been looking at the problem, but progress has been admittedly
> slow because of other duties and my inexperience with the test setup.
> What would you like?

This was fixed by: http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00791.html

Thanks,
Andrew Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02 21:00         ` Tom Tromey
@ 2007-03-02 22:16           ` Mike Stump
  0 siblings, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-02 22:16 UTC (permalink / raw)
  To: tromey; +Cc: gcc-patches

On Mar 2, 2007, at 10:47 AM, Tom Tromey wrote:
> Some of this, though, is just the problem of having too few  
> maintainers for some areas.  E.g., there is no active libcpp  
> maintainer.

> This, I fear, would lead to directionless maintenance.

Well, as I recall, libcpp for the most part has only needed light  
directionless maintenance for a while now.  I don't think that is a  
bad thing.  I don't fear it.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 22:25       ` Mike Stump
  2007-03-01 23:03         ` Ian Lance Taylor
@ 2007-03-02 21:00         ` Tom Tromey
  2007-03-02 22:16           ` Mike Stump
  1 sibling, 1 reply; 61+ messages in thread
From: Tom Tromey @ 2007-03-02 21:00 UTC (permalink / raw)
  To: gcc-patches

>>>>> "Mike" == Mike Stump <mrs@apple.com> writes:

Mike> Yes, that we all can agree on that.  http://www.dberlin.org/patches/
Mike> patches/list also suggests that it can also take a year and never get
Mike> a single review.

Some of this, though, is just the problem of having too few
maintainers for some areas.  E.g., there is no active libcpp
maintainer.  Instead libcpp patches wait for Mark to have a few spare
moments to do a review.  I'm sure the more complicated libcpp patches
suffer for this... but it seems unlikely to me that post-commit review
would help this.  In fact, it may make it worse, since I'd imagine
many patches would simply go without a review.  This, I fear, would
lead to directionless maintenance.

Mike> Why exclude them, let's insist they have to have their patches
Mike> reviewed as well, in fact, we can insist on a fifo for reviews, that
Mike> would ensure that the upper bound on reviews isn't 2 years.

Yeah, universal patch review is a good idea IMO.  But that may make
things even worse :-(

Tom

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  1:30                     ` Andrew Pinski
  2007-03-02  2:52                       ` Chris Lattner
@ 2007-03-02  3:03                       ` Kaveh R. GHAZI
  1 sibling, 0 replies; 61+ messages in thread
From: Kaveh R. GHAZI @ 2007-03-02  3:03 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Mike Stump, Brooks Moses, gcc-patches

On Thu, 1 Mar 2007, Andrew Pinski wrote:

> On 3/1/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> > I also like to idea of N patches before becoming a maintainer of some
> > area.  If person X touches a file or area 100 times (or some cut-off),
> > they should be considered it's de-facto maintainer. :-)
>
> What if the person touched the same 10 line 100 times, that should not
> make him/her maintainer of that whole file.  In fact that should
> signal red flags.  In fact touching a file 100 times should signal red
> flags (unless they are new addition and not just fixing bugs).
> -- Pinski

That scenario is a strawman, you missed the smiley on my last sentence I
guess, and my whole thesis about looking for good judgement on the part of
the developer.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 23:03         ` Ian Lance Taylor
  2007-03-01 23:11           ` Mike Stump
@ 2007-03-02  2:54           ` Chris Lattner
  1 sibling, 0 replies; 61+ messages in thread
From: Chris Lattner @ 2007-03-02  2:54 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Mike Stump, gcc-patches

On Mar 1, 2007, at 3:03 PM, Ian Lance Taylor wrote:
> Mike Stump <mrs@apple.com> writes:
>> To steal an idea from llvm, if we permit post checkin review for
>> people that submit 100 good patches, would the wheels fall off the
>> bus?  It seems to work for them, is there some reason why it couldn't
>> for us?  Would it be more efficient and led to happier and more
>> productive employees, oops, I mean contributors or less happiness and
>> more inefficiencies?
>
> Can you describe post-checkin review?

If you have a specific question, I can answer it.

-Chris

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  1:30                     ` Andrew Pinski
@ 2007-03-02  2:52                       ` Chris Lattner
  2007-03-02  3:03                       ` Kaveh R. GHAZI
  1 sibling, 0 replies; 61+ messages in thread
From: Chris Lattner @ 2007-03-02  2:52 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Kaveh R. GHAZI, Mike Stump, Brooks Moses, gcc-patches


On Mar 1, 2007, at 5:30 PM, Andrew Pinski wrote:

> On 3/1/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
>> I also like to idea of N patches before becoming a maintainer of some
>> area.  If person X touches a file or area 100 times (or some cut- 
>> off),
>> they should be considered it's de-facto maintainer. :-)
>
> What if the person touched the same 10 line 100 times, that should not
> make him/her maintainer of that whole file.  In fact that should
> signal red flags.  In fact touching a file 100 times should signal red
> flags (unless they are new addition and not just fixing bugs).

The LLVM dev policy does not to try to define common sense.  It is a  
rough guideline which can be deviated from when it makes sense.

"Trust but verify" starts with trust.

-Chris

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  1:27                   ` Kaveh R. GHAZI
  2007-03-02  1:30                     ` Andrew Pinski
@ 2007-03-02  2:50                     ` Chris Lattner
  1 sibling, 0 replies; 61+ messages in thread
From: Chris Lattner @ 2007-03-02  2:50 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Andrew Pinski, Mike Stump, Brooks Moses, gcc-patches


On Mar 1, 2007, at 5:23 PM, Kaveh R. GHAZI wrote:

> On Thu, 1 Mar 2007, Andrew Pinski wrote:
>
>> On 3/1/07, Mike Stump <mrs@apple.com> wrote:
>>>    people with CVS write access can approve it.
>>
>> I would not like someone with only libobjc knowledge approving  
>> patches
>> that touch fold-const.c, do you?
>> -- Pinski
>
>
> It's possible for developers to "know what they don't know".  Not  
> every
> developer reaches that level of self-awareness.  But it's often  
> clear when
> they do.

Exactly.

Also, if someone does something inappropriate that error can be fixed  
(due to the wonders of version control) and the developer scolded.

-Chris

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  0:56               ` Mike Stump
  2007-03-02  1:02                 ` Andrew Pinski
@ 2007-03-02  1:46                 ` Brooks Moses
  1 sibling, 0 replies; 61+ messages in thread
From: Brooks Moses @ 2007-03-02  1:46 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

On Thu, Mar 01, 2007 at 04:56:14PM -0800, Mike Stump wrote:
> On Mar 1, 2007, at 3:44 PM, Brooks Moses wrote:
> > although it may be different in how it's applied in practice.  I  
> > note the following text, from the "obtaining commit access" section:
> 
> Those rules only apply in one small case:
> 
>    If you have recently been granted commit access, these policies  
> apply:
> 
> this is different from gcc.

You're right -- I missed that caveat entirely, and of course that
dramatically changes things.  I wonder how "recently" is determined,
since the rules don't seem to say....

(It also seems a bit odd, looking at this from the perspective of being
used to GCC policies, that one might be a maintainer of some section of
the code and still be in the "recently been granted commit access"
stage.)

- Brooks

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  1:02                 ` Andrew Pinski
  2007-03-02  1:27                   ` Kaveh R. GHAZI
@ 2007-03-02  1:31                   ` Mike Stump
  1 sibling, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-02  1:31 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Brooks Moses, gcc-patches

On Mar 1, 2007, at 5:00 PM, Andrew Pinski wrote:
> On 3/1/07, Mike Stump <mrs@apple.com> wrote:
>> people with CVS write access can approve it.
>
> I would not like someone with only libobjc knowledge approving patches
> that touch fold-const.c, do you?

So, do you think there is a chance that there are some patches to  
fold-const.c that you are qualified enough to review?  I personally  
wouldn't mind if you approved patches to fold-const.c, if you agree  
to let us tell you when you are wrong.  :-)

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  1:27                   ` Kaveh R. GHAZI
@ 2007-03-02  1:30                     ` Andrew Pinski
  2007-03-02  2:52                       ` Chris Lattner
  2007-03-02  3:03                       ` Kaveh R. GHAZI
  2007-03-02  2:50                     ` Chris Lattner
  1 sibling, 2 replies; 61+ messages in thread
From: Andrew Pinski @ 2007-03-02  1:30 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: Mike Stump, Brooks Moses, gcc-patches

On 3/1/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> I also like to idea of N patches before becoming a maintainer of some
> area.  If person X touches a file or area 100 times (or some cut-off),
> they should be considered it's de-facto maintainer. :-)

What if the person touched the same 10 line 100 times, that should not
make him/her maintainer of that whole file.  In fact that should
signal red flags.  In fact touching a file 100 times should signal red
flags (unless they are new addition and not just fixing bugs).

-- Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  1:02                 ` Andrew Pinski
@ 2007-03-02  1:27                   ` Kaveh R. GHAZI
  2007-03-02  1:30                     ` Andrew Pinski
  2007-03-02  2:50                     ` Chris Lattner
  2007-03-02  1:31                   ` Mike Stump
  1 sibling, 2 replies; 61+ messages in thread
From: Kaveh R. GHAZI @ 2007-03-02  1:27 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Mike Stump, Brooks Moses, gcc-patches

On Thu, 1 Mar 2007, Andrew Pinski wrote:

> On 3/1/07, Mike Stump <mrs@apple.com> wrote:
> >    people with CVS write access can approve it.
>
> I would not like someone with only libobjc knowledge approving patches
> that touch fold-const.c, do you?
> -- Pinski


It's possible for developers to "know what they don't know".  Not every
developer reaches that level of self-awareness.  But it's often clear when
they do.

If we had a more liberal checkin policy, in your above example I would
expect someone who is only expert in libobjc to only review libobjc
patches and if they touch other areas they are not familiar with, they
should request reviews same as other people.  Once they gain sufficient
expertise, then they could begin to checkin patches to new areas without
review.  We might create a mini-GWP once someone has shown sufficient
judgement that they respect their own limitations.

I also like to idea of N patches before becoming a maintainer of some
area.  If person X touches a file or area 100 times (or some cut-off),
they should be considered it's de-facto maintainer. :-)

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-02  0:56               ` Mike Stump
@ 2007-03-02  1:02                 ` Andrew Pinski
  2007-03-02  1:27                   ` Kaveh R. GHAZI
  2007-03-02  1:31                   ` Mike Stump
  2007-03-02  1:46                 ` Brooks Moses
  1 sibling, 2 replies; 61+ messages in thread
From: Andrew Pinski @ 2007-03-02  1:02 UTC (permalink / raw)
  To: Mike Stump; +Cc: Brooks Moses, gcc-patches

On 3/1/07, Mike Stump <mrs@apple.com> wrote:
>    people with CVS write access can approve it.

I would not like someone with only libobjc knowledge approving patches
that touch fold-const.c, do you?

-- Pinski

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 23:56             ` Brooks Moses
@ 2007-03-02  0:56               ` Mike Stump
  2007-03-02  1:02                 ` Andrew Pinski
  2007-03-02  1:46                 ` Brooks Moses
  0 siblings, 2 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-02  0:56 UTC (permalink / raw)
  To: Brooks Moses; +Cc: gcc-patches

On Mar 1, 2007, at 3:44 PM, Brooks Moses wrote:
> FWIW, this does not seem to be materially different from GCC's  
> policies,

They are quite different.

> although it may be different in how it's applied in practice.  I  
> note the following text, from the "obtaining commit access" section:

Those rules only apply in one small case:

   If you have recently been granted commit access, these policies  
apply:

this is different from gcc.

Further, once yo have access, it would seem this rule applies:

   people with CVS write access can approve it.

which again, is ever so slightly different.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 23:11           ` Mike Stump
@ 2007-03-01 23:56             ` Brooks Moses
  2007-03-02  0:56               ` Mike Stump
  0 siblings, 1 reply; 61+ messages in thread
From: Brooks Moses @ 2007-03-01 23:56 UTC (permalink / raw)
  To: gcc-patches

Mike Stump wrote:
> On Mar 1, 2007, at 3:03 PM, Ian Lance Taylor wrote:
>> Can you describe post-checkin review?
> 
> Beyond:
> 
>    http://llvm.org/docs/DeveloperPolicy.html#reviews
> 
> No, I'd not claim I have any experience with it in llvm, but, I do  
> sit next to people that do.  :-)

FWIW, this does not seem to be materially different from GCC's policies, 
although it may be different in how it's applied in practice.  I note 
the following text, from the "obtaining commit access" section:

"You are allowed to commit patches without approval to those portions of 
LLVM that you have contributed or maintain (i.e., have been assigned 
responsibility for), with the proviso that such commits must not break 
the build. This is a "trust but verify" policy and commits of this 
nature are reviewed after they are committed."

When that rule doesn't apply -- i.e., if one only has commit-after- 
approval status, or the code in question is not something that one is a 
maintainer of -- then the standard rules of requiring pre-approval 
apply, just as in GCC.

And the only time those rules do apply is when one is a maintainer of 
the code in question.  According to the GCC Write Access Policies, GCC 
maintainers likewise have permission to commit code in their areas of 
maintenance without getting pre-approval.

Now, it may be that culturally, llvm maintainers tend to do a lot more 
commits without asking for pre-review, and it may also be that llvm has 
a higher percentage of maintainers among its contributors; I would be 
interesting to know if those are the case or not.  But the rules 
themselves seem essentially the same.

- Brooks

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 23:03         ` Ian Lance Taylor
@ 2007-03-01 23:11           ` Mike Stump
  2007-03-01 23:56             ` Brooks Moses
  2007-03-02  2:54           ` Chris Lattner
  1 sibling, 1 reply; 61+ messages in thread
From: Mike Stump @ 2007-03-01 23:11 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches

On Mar 1, 2007, at 3:03 PM, Ian Lance Taylor wrote:
> Mike Stump <mrs@apple.com> writes:
>
>> To steal an idea from llvm, if we permit post checkin review for
>> people that submit 100 good patches, would the wheels fall off the
>> bus?  It seems to work for them, is there some reason why it couldn't
>> for us?  Would it be more efficient and led to happier and more
>> productive employees, oops, I mean contributors or less happiness and
>> more inefficiencies?
>
> Can you describe post-checkin review?

Beyond:

   http://llvm.org/docs/DeveloperPolicy.html#reviews

No, I'd not claim I have any experience with it in llvm, but, I do  
sit next to people that do.  :-)

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 22:25       ` Mike Stump
@ 2007-03-01 23:03         ` Ian Lance Taylor
  2007-03-01 23:11           ` Mike Stump
  2007-03-02  2:54           ` Chris Lattner
  2007-03-02 21:00         ` Tom Tromey
  1 sibling, 2 replies; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01 23:03 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches

Mike Stump <mrs@apple.com> writes:

> To steal an idea from llvm, if we permit post checkin review for
> people that submit 100 good patches, would the wheels fall off the
> bus?  It seems to work for them, is there some reason why it couldn't
> for us?  Would it be more efficient and led to happier and more
> productive employees, oops, I mean contributors or less happiness and
> more inefficiencies?

Can you describe post-checkin review?

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 21:38     ` Ian Lance Taylor
@ 2007-03-01 22:25       ` Mike Stump
  2007-03-01 23:03         ` Ian Lance Taylor
  2007-03-02 21:00         ` Tom Tromey
  0 siblings, 2 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-01 22:25 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Devang Patel, gcc-patches

On Mar 1, 2007, at 1:38 PM, Ian Lance Taylor wrote:
> "Devang Patel" <devang.patel@gmail.com> writes:
>
>>> Do you have a link to the submission to gcc-patches?
>>
>> http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00130.html
>>
>> Patch received immediate "no" for reasons unrelated
>> to debug info and later on discussion centered on
>> documentation issues and its use of PCH for header
>> validation.  May be patch lost traction because it was
>> foucsing STABS.
>
> Getting a significant patch like that into gcc requires an extensive
> period of give-and-take.

Yes, that we all can agree on that.  http://www.dberlin.org/patches/ 
patches/list also suggests that it can also take a year and never get  
a single review.

> That is true for all of us (except the global write maintainers).

Why exclude them, let's insist they have to have their patches  
reviewed as well, in fact, we can insist on a fifo for reviews, that  
would ensure that the upper bound on reviews isn't 2 years.

> This development approach does work, more or less, but seems far  
> from optimal.

To steal an idea from llvm, if we permit post checkin review for  
people that submit 100 good patches, would the wheels fall off the  
bus?  It seems to work for them, is there some reason why it couldn't  
for us?  Would it be more efficient and led to happier and more  
productive employees, oops, I mean contributors or less happiness and  
more inefficiencies?

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 19:41     ` Daniel Jacobowitz
  2007-03-01 19:58       ` Devang Patel
@ 2007-03-01 22:03       ` Mike Stump
  1 sibling, 0 replies; 61+ messages in thread
From: Mike Stump @ 2007-03-01 22:03 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Devang Patel, Ian Lance Taylor, gcc-patches

On Mar 1, 2007, at 11:41 AM, Daniel Jacobowitz wrote:
> On Thu, Mar 01, 2007 at 11:24:18AM -0800, Devang Patel wrote:
>> Since then we learned many things about this approach,
>> and newest darwin tools do not use it anyway. My point was,
>> GCC lost valuable time experimenting and learning from
>> such approach in tackling not so simple issue.
>
> Apple also lost lots of time by not discussing any of this on the
> mailing lists and maintaining their own solution :-)

Your mistaken.  We've shipped many solutions in the time span that  
not much was done in mainline.  Our current solution can shave  
gigabytes off the debug information size going through the linker,  
we're happy.

> In an ideal world, the Apple tools developers would have more time  
> to work with FSF GCC (and GDB) communities so that all could benefit.

In the end, it comes down to lead, follow, or get out of the way.  I  
want gcc to lead, history will teach us if we meet that goal.  So  
far, I think we do a pretty good job, though, as times I'd like gcc  
to do better.  One thing I am certain of is, tomorrow will bring new  
demands as well as new competition.  gcc needs to spend what  
resources it has wisely and effectively to meet those demands and the  
competition.

At times, I use:

   http://www.dberlin.org/patches/patches/list

as a proxy for how effectively we're using resources, and it still  
feels to me that we could be more efficient at what we do.  I'd like  
to see us reorganize how we do what it is that we do to substantially  
reduce review time.  For example, llvm permits post checkin review.   
I do wonder if we granted post-checkin review status to people after  
they submit X good patches, if that would let us use those resources  
more effectively.

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 19:24   ` Devang Patel
  2007-03-01 19:41     ` Daniel Jacobowitz
@ 2007-03-01 21:38     ` Ian Lance Taylor
  2007-03-01 22:25       ` Mike Stump
  1 sibling, 1 reply; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01 21:38 UTC (permalink / raw)
  To: Devang Patel; +Cc: gcc-patches

"Devang Patel" <devang.patel@gmail.com> writes:

> > Do you have a link to the submission to gcc-patches?
> 
> http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00130.html
> 
> Patch received immediate "no" for reasons unrelated
> to debug info and later on discussion centered on
> documentation issues and its use of PCH for header
> validation.  May be patch lost traction because it was
> foucsing STABS.

Getting a significant patch like that into gcc requires an extensive
period of give-and-take.  That is true for all of us (except the
global write maintainers).  I've been working for over two months on
-fstrict-overflow and -Wstrict-overflow.  Take to Richard Guenther
some time about leafify, or to Steven Bosscher about just about
anything he tackles.  That's just the way it goes.

I don't know of another approach which can work if we take our
distributed development model as a given.  We can't force everybody
into one room to hash out the issues.  We don't have a manager forcing
things to get done.  Instead, people need to advocate the patch and
keep changing it to respond to comments and keep pushing to get it in.

This development approach does work, more or less, but seems far from
optimal.  I don't have any ideas about how to improve it at this
level.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 19:41     ` Daniel Jacobowitz
@ 2007-03-01 19:58       ` Devang Patel
  2007-03-01 22:03       ` Mike Stump
  1 sibling, 0 replies; 61+ messages in thread
From: Devang Patel @ 2007-03-01 19:58 UTC (permalink / raw)
  To: Devang Patel, Ian Lance Taylor, gcc-patches

On 3/1/07, Daniel Jacobowitz <drow@false.org> wrote:
> On Thu, Mar 01, 2007 at 11:24:18AM -0800, Devang Patel wrote:
> > Since then we learned many things about this approach,
> > and newest darwin tools do not use it anyway. My point was,
> > GCC lost valuable time experimenting and learning from
> > such approach in tackling not so simple issue.
>
> Apple also lost lots of time by not discussing any of this on the
> mailing lists and maintaining their own solution :-)

The approach I mentioned was sent on GCC list as an RFC.

> There's more
> than enough blame to go around, thanks.  In an ideal world, the Apple
> tools developers would have more time to work with FSF GCC (and GDB)
> communities so that all could benefit.

I do not speak for GDB develoeprs or other developers.
When I worked on this topic, I presented every opportunity/idea to
FSF GCC team. I remember requesting feedback on "no debug
info for constructor/destructore" also.

STABS was the big mental hurdle to overcome on *both* side.

We are going OT here. I only wanted to contribute two things
in this thread :

1) Apple develoeprs has found a way (I am not participating in
that project) to deal with this issue. Atleast talk to them first.
If they are not communicating then what can I say ? :)

2) Do not block Lawrence's patch just because it is not an ideal
solution. You may not find best solution in this case without
experimenting.

-
Devang

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 19:24   ` Devang Patel
@ 2007-03-01 19:41     ` Daniel Jacobowitz
  2007-03-01 19:58       ` Devang Patel
  2007-03-01 22:03       ` Mike Stump
  2007-03-01 21:38     ` Ian Lance Taylor
  1 sibling, 2 replies; 61+ messages in thread
From: Daniel Jacobowitz @ 2007-03-01 19:41 UTC (permalink / raw)
  To: Devang Patel; +Cc: Ian Lance Taylor, gcc-patches

On Thu, Mar 01, 2007 at 11:24:18AM -0800, Devang Patel wrote:
> Since then we learned many things about this approach,
> and newest darwin tools do not use it anyway. My point was,
> GCC lost valuable time experimenting and learning from
> such approach in tackling not so simple issue.

Apple also lost lots of time by not discussing any of this on the
mailing lists and maintaining their own solution :-)  There's more
than enough blame to go around, thanks.  In an ideal world, the Apple
tools developers would have more time to work with FSF GCC (and GDB)
communities so that all could benefit.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 19:04 ` Ian Lance Taylor
@ 2007-03-01 19:24   ` Devang Patel
  2007-03-01 19:41     ` Daniel Jacobowitz
  2007-03-01 21:38     ` Ian Lance Taylor
  0 siblings, 2 replies; 61+ messages in thread
From: Devang Patel @ 2007-03-01 19:24 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches

> Do you have a link to the submission to gcc-patches?

http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00130.html

Patch received immediate "no" for reasons unrelated
to debug info and later on discussion centered on
documentation issues and its use of PCH for header
validation.  May be patch lost traction because it was
foucsing STABS.

Since then we learned many things about this approach,
and newest darwin tools do not use it anyway. My point was,
GCC lost valuable time experimenting and learning from
such approach in tackling not so simple issue.

-
Devang

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
@ 2007-03-01 19:06 Devang Patel
  0 siblings, 0 replies; 61+ messages in thread
From: Devang Patel @ 2007-03-01 19:06 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gcc-patches

>  - Have a symbol database per "project".

ok. Actually "per build target" makes more sense.

>  - When compiling a file, generate complete debug info for each
>    included header iff the database says it is not yet output,
>    or if (magic happens) it appears to be stale.  (other magic
>    happens) to handle including files with different #define's
>    that would affect the debug info.  Note, incompatible with
>    omitting unused information.  We generate bigger debug info
>    this way but a lot less overall.

I used PCH's header validation scheme to handle different #define
settings. This approach is crude and overkill here but it works and
reuses existing implementation.
>
>  - Generate that debug info either into objects, or into the
>    symbol database, which is more complicated but more flexible if
>    multiple binaries get linked from the same object files.  In
>    practice maybe that means one debug file per .o file.

one debug.o per header ? Very large portion of debug info is
type descriptions (from header files) that is duplicated in
all .o files

>  - At link time (other magic happens) the right object files get sent
>    along to ld, this bit is familiar from collect2.

I got Xcode to this job :). This approach helped us move forward
and overcome "linker runs of vm memory" hurdle when darwin
tool chain used STABS (instead of DWARF).

-
Devang

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
  2007-03-01 18:54 Devang Patel
@ 2007-03-01 19:04 ` Ian Lance Taylor
  2007-03-01 19:24   ` Devang Patel
  0 siblings, 1 reply; 61+ messages in thread
From: Ian Lance Taylor @ 2007-03-01 19:04 UTC (permalink / raw)
  To: Devang Patel; +Cc: gcc-patches

"Devang Patel" <devang.patel@gmail.com> writes:

> > C++ debug info size is a problem for real uses of gcc.  We've got a
> > patch on the table.
> 
> We had patch few years ago that follows more or less what Dan described
> earlier. And it was ignored/rejected in favor of unbuilt system without anyone
> cosidering  "is it useful, does it work, is it well-written." ;)

Do you have a link to the submission to gcc-patches?


> > We don't have to use it.  But while I would love
> > to see a symbol database, I don't see that as a viable alternative for
> > all people.  And it doesn't exist and it's not trivial to implement
> > and nobody is working on it.
> 
> and after couple of years GCC is still here.
> 
> Despite what you said earlier, I understand that you'd like to see
> Lawrence's patch included in mainline GCC in one form or other :)

I wouldn't put it that strongly.  If it is rejected, I would prefer
that it be rejected for what I consider to be a good reason.  (Of
course as a middle-end maintainer I could force it in, but I don't
like to work that way.)


> I do not blame you either :). If you are thinking in this direction
> then one additional thing to consider : "Avoid emitting debug info. that
> GDB does not use it and user can not take advantage of it through
> GDB." For example, C++ constructor/destructor info.

Sounds like a good idea to me.  And an orthogonal one.


> If you have not talked with Apple GDB folks then give them a call.
> They have dealt with seriousness of this issue and found resonable
> approach that works on very large system.

My understanding of Apple's approach is that it wouldn't work for us.
But it may well be that I don't understand it.

Ian

^ permalink raw reply	[flat|nested] 61+ messages in thread

* Re: Reduce Dwarf Debug Size
@ 2007-03-01 18:54 Devang Patel
  2007-03-01 19:04 ` Ian Lance Taylor
  0 siblings, 1 reply; 61+ messages in thread
From: Devang Patel @ 2007-03-01 18:54 UTC (permalink / raw)
  To: iant; +Cc: gcc-patches

> C++ debug info size is a problem for real uses of gcc.  We've got a
> patch on the table.

We had patch few years ago that follows more or less what Dan described
earlier. And it was ignored/rejected in favor of unbuilt system without anyone
cosidering  "is it useful, does it work, is it well-written." ;)

> We don't have to use it.  But while I would love
> to see a symbol database, I don't see that as a viable alternative for
> all people.  And it doesn't exist and it's not trivial to implement
> and nobody is working on it.

and after couple of years GCC is still here.

Despite what you said earlier, I understand that you'd like to see
Lawrence's patch included in mainline GCC in one form or other :)
I do not blame you either :). If you are thinking in this direction
then one additional thing to consider : "Avoid emitting debug info. that
GDB does not use it and user can not take advantage of it through
GDB." For example, C++ constructor/destructor info.

If you have not talked with Apple GDB folks then give them a call.
They have dealt with seriousness of this issue and found resonable
approach that works on very large system.

-
Devang

^ permalink raw reply	[flat|nested] 61+ messages in thread

end of thread, other threads:[~2007-07-22  2:38 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-27 20:51 Reduce Dwarf Debug Size Lawrence Crowl
2007-02-27 20:59 ` Andrew Pinski
2007-02-27 21:14   ` Andrew Pinski
     [not found] ` <796808AD-9E2E-4DD6-B817-2EFDDC1943D8@apple.com>
     [not found]   ` <m3zm6y2deu.fsf@localhost.localdomain>
     [not found]     ` <20070228220350.GA20232@caradoc.them.org>
     [not found]       ` <m3r6s9x3kn.fsf@dhcp-172-18-118-213.corp.google.com>
2007-03-01  1:24         ` Daniel Jacobowitz
2007-03-01  1:40           ` Andrew Pinski
2007-03-01  2:22             ` Ian Lance Taylor
2007-03-01  2:20           ` Ian Lance Taylor
2007-03-01  3:41             ` Daniel Jacobowitz
2007-03-01  5:48               ` Ian Lance Taylor
2007-03-01 21:07                 ` Lawrence Crowl
2007-03-01 21:15                   ` Daniel Jacobowitz
2007-03-01 22:32                     ` Lawrence Crowl
2007-03-01 21:35                   ` Joseph S. Myers
2007-03-01 22:07                     ` Mike Stump
2007-03-01 22:12                     ` Lawrence Crowl
2007-03-01  1:48         ` Mike Stump
2007-03-01  2:27           ` Ian Lance Taylor
2007-03-01  3:06             ` Mike Stump
2007-03-01  1:52       ` Mike Stump
2007-03-02  3:04 ` Mark Mitchell
2007-03-02  4:05   ` Mike Stump
2007-03-03  4:17 ` Michael Eager
2007-03-03 22:33   ` Daniel Berlin
2007-03-04 17:58     ` Mark Mitchell
2007-03-04  4:40   ` Ian Lance Taylor
2007-03-03  5:36 ` Alexandre Oliva
2007-03-05 17:35   ` Mike Stump
2007-03-23 21:05     ` Lawrence Crowl
2007-04-05 16:32       ` Ian Lance Taylor
2007-04-06  0:15         ` Daniel Jacobowitz
2007-05-06  1:55         ` Andrew Pinski
2007-05-08 23:48           ` Lawrence Crowl
2007-05-08 23:56             ` Andrew Pinski
2007-05-17 21:39               ` Andrew Pinski
2007-05-18  0:01                 ` Lawrence Crowl
2007-07-22  9:17                   ` Andrew Pinski
2007-04-17  7:27       ` Ian Lance Taylor
2007-03-01 18:54 Devang Patel
2007-03-01 19:04 ` Ian Lance Taylor
2007-03-01 19:24   ` Devang Patel
2007-03-01 19:41     ` Daniel Jacobowitz
2007-03-01 19:58       ` Devang Patel
2007-03-01 22:03       ` Mike Stump
2007-03-01 21:38     ` Ian Lance Taylor
2007-03-01 22:25       ` Mike Stump
2007-03-01 23:03         ` Ian Lance Taylor
2007-03-01 23:11           ` Mike Stump
2007-03-01 23:56             ` Brooks Moses
2007-03-02  0:56               ` Mike Stump
2007-03-02  1:02                 ` Andrew Pinski
2007-03-02  1:27                   ` Kaveh R. GHAZI
2007-03-02  1:30                     ` Andrew Pinski
2007-03-02  2:52                       ` Chris Lattner
2007-03-02  3:03                       ` Kaveh R. GHAZI
2007-03-02  2:50                     ` Chris Lattner
2007-03-02  1:31                   ` Mike Stump
2007-03-02  1:46                 ` Brooks Moses
2007-03-02  2:54           ` Chris Lattner
2007-03-02 21:00         ` Tom Tromey
2007-03-02 22:16           ` Mike Stump
2007-03-01 19:06 Devang Patel

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).