re PR debug/36060 (Too big stack requirements of cc1plus during GC)

PR debug/36060
	* dwarf2out.c (struct die_struct): Mark as chain_circular through
	die_sub field.
	* gengtype.c (walk_type, write_func_for_structure): Handle
	chain_circular.
	* doc/gty.texi: Document chain_circular.

From-SVN: r134750
This commit is contained in:
Jakub Jelinek 2008-04-28 11:45:26 +02:00
parent 0e8d83837e
commit 623f8e39bc
6 changed files with 55 additions and 23 deletions

View File

@ -1,3 +1,12 @@
2008-04-28 Jakub Jelinek <jakub@redhat.com>
PR debug/36060
* dwarf2out.c (struct die_struct): Mark as chain_circular through
die_sub field.
* gengtype.c (walk_type, write_func_for_structure): Handle
chain_circular.
* doc/gty.texi: Document chain_circular.
2008-04-28 Richard Guenther <rguenther@suse.de> 2008-04-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36066 PR tree-optimization/36066
@ -78,7 +87,7 @@
* config/vxworks.c: Include tree.h. * config/vxworks.c: Include tree.h.
(vxworks_emutls_var_fields, vxworks_emutls_var_init): New. (vxworks_emutls_var_fields, vxworks_emutls_var_init): New.
(vxworks_override_options): Set TLS scheme. (vxworks_override_options): Set TLS scheme.
* gcc/doc/tm.texi (Emulated TLS): New node. * doc/tm.texi (Emulated TLS): New node.
2008-04-26 Simon Baldwin <simonb@google.com> 2008-04-26 Simon Baldwin <simonb@google.com>
@ -2190,10 +2199,7 @@
2008-04-01 George Helffrich <george@gcc.gnu.org> 2008-04-01 George Helffrich <george@gcc.gnu.org>
PR fortran/PR35154, fortran/PR23057 PR fortran/35154, fortran/23057
* fortran/trans-common.c (create_common): Add decl to function
chain to preserve identifier scope in debug output.
* dbxout.c: Emit .stabs debug info for Fortran COMMON block * dbxout.c: Emit .stabs debug info for Fortran COMMON block
variables as base symbol name + offset using N_BCOMM/N_ECOMM. variables as base symbol name + offset using N_BCOMM/N_ECOMM.
(is_fortran, dbxout_common_name, dbxout_common_check): New functions. (is_fortran, dbxout_common_name, dbxout_common_check): New functions.
@ -2211,18 +2217,6 @@
(common_check): New function to check whether symbol in Fortran COMMON. (common_check): New function to check whether symbol in Fortran COMMON.
(gen_variable_die): If COMMON, use DW_TAG_common_block. (gen_variable_die): If COMMON, use DW_TAG_common_block.
* testsuite/gcc.dg/debug/pr35154.c: New test to check that non-Fortran
use of common is unchanged.
* testsuite/lib/gfortran-dg.exp: New harness to compile Fortran progs
with all combinations of debug options available on target.
* testsuite/gfortran.dg/debug/debug.exp: Ditto.
* testsuite/gfortran.dg/debug/trivial.f: Ditto.
* testsuite/gfortran.dg/debug/pr35154-stabs.f: New test case for
.stabs functionality.
* testsuite/gfortran.dg/debug/pr35154-dwarf2.f: New test case for
DWARF functionality.
2008-04-01 Volker Reichelt <v.reichelt@netcologne.de> 2008-04-01 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35436 PR c/35436
@ -6040,7 +6034,6 @@
* config/spu/spu-builtins.def: Fixed wrong parameter type in spu * config/spu/spu-builtins.def: Fixed wrong parameter type in spu
intrinsics spu_convts, spu_convtu, spu_convtf. intrinsics spu_convts, spu_convtu, spu_convtf.
* testsuite/gcc.target/spu/intrinsics-3.c: New. Test error messages.
2008-02-08 Hans-Peter Nilsson <hp@axis.com> 2008-02-08 Hans-Peter Nilsson <hp@axis.com>

View File

@ -316,8 +316,10 @@ escape.
@findex chain_next @findex chain_next
@findex chain_prev @findex chain_prev
@findex chain_circular
@item chain_next ("@var{expression}") @item chain_next ("@var{expression}")
@itemx chain_prev ("@var{expression}") @itemx chain_prev ("@var{expression}")
@itemx chain_circular ("@var{expression}")
It's helpful for the type machinery to know if objects are often It's helpful for the type machinery to know if objects are often
chained together in long lists; this lets it generate code that uses chained together in long lists; this lets it generate code that uses
@ -326,7 +328,8 @@ it. @code{chain_next} is an expression for the next item in the list,
@code{chain_prev} is an expression for the previous item. For singly @code{chain_prev} is an expression for the previous item. For singly
linked lists, use only @code{chain_next}; for doubly linked lists, use linked lists, use only @code{chain_next}; for doubly linked lists, use
both. The machinery requires that taking the next item of the both. The machinery requires that taking the next item of the
previous item gives the original item. previous item gives the original item. @code{chain_circular} is similar
to @code{chain_next}, but can be used for circular single linked lists.
@findex reorder @findex reorder
@item reorder ("@var{function name}") @item reorder ("@var{function name}")

View File

@ -3837,7 +3837,7 @@ DEF_VEC_ALLOC_O(dw_attr_node,gc);
The children of each node form a circular list linked by The children of each node form a circular list linked by
die_sib. die_child points to the node *before* the "first" child node. */ die_sib. die_child points to the node *before* the "first" child node. */
typedef struct die_struct GTY(()) typedef struct die_struct GTY((chain_circular ("%h.die_sib")))
{ {
enum dwarf_tag die_tag; enum dwarf_tag die_tag;
char *die_symbol; char *die_symbol;

View File

@ -227,6 +227,7 @@
2008-04-01 George Helffrich <george@gcc.gnu.org> 2008-04-01 George Helffrich <george@gcc.gnu.org>
PR fortran/35154, fortran/23057
* trans-common.c (create_common): Add decl to function * trans-common.c (create_common): Add decl to function
chain to preserve identifier scope in debug output. chain to preserve identifier scope in debug output.

View File

@ -1937,6 +1937,8 @@ walk_type (type_p t, struct walk_type_data *d)
; ;
else if (strcmp (oo->name, "chain_prev") == 0) else if (strcmp (oo->name, "chain_prev") == 0)
; ;
else if (strcmp (oo->name, "chain_circular") == 0)
;
else if (strcmp (oo->name, "reorder") == 0) else if (strcmp (oo->name, "reorder") == 0)
; ;
else else
@ -2414,6 +2416,7 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
int i; int i;
const char *chain_next = NULL; const char *chain_next = NULL;
const char *chain_prev = NULL; const char *chain_prev = NULL;
const char *chain_circular = NULL;
const char *mark_hook_name = NULL; const char *mark_hook_name = NULL;
options_p opt; options_p opt;
struct walk_type_data d; struct walk_type_data d;
@ -2432,11 +2435,17 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
chain_next = opt->info; chain_next = opt->info;
else if (strcmp (opt->name, "chain_prev") == 0) else if (strcmp (opt->name, "chain_prev") == 0)
chain_prev = opt->info; chain_prev = opt->info;
else if (strcmp (opt->name, "chain_circular") == 0)
chain_circular = opt->info;
else if (strcmp (opt->name, "mark_hook") == 0) else if (strcmp (opt->name, "mark_hook") == 0)
mark_hook_name = opt->info; mark_hook_name = opt->info;
if (chain_prev != NULL && chain_next == NULL) if (chain_prev != NULL && chain_next == NULL)
error_at_line (&s->u.s.line, "chain_prev without chain_next"); error_at_line (&s->u.s.line, "chain_prev without chain_next");
if (chain_circular != NULL && chain_next != NULL)
error_at_line (&s->u.s.line, "chain_circular with chain_next");
if (chain_circular != NULL)
chain_next = chain_circular;
d.process_field = write_types_process_field; d.process_field = write_types_process_field;
d.cookie = wtd; d.cookie = wtd;
@ -2481,7 +2490,10 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
} }
else else
{ {
oprintf (d.of, " while (%s (xlimit", wtd->marker_routine); if (chain_circular != NULL)
oprintf (d.of, " if (!%s (xlimit", wtd->marker_routine);
else
oprintf (d.of, " while (%s (xlimit", wtd->marker_routine);
if (wtd->param_prefix) if (wtd->param_prefix)
{ {
oprintf (d.of, ", xlimit, gt_%s_", wtd->param_prefix); oprintf (d.of, ", xlimit, gt_%s_", wtd->param_prefix);
@ -2489,6 +2501,8 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
output_type_enum (d.of, orig_s); output_type_enum (d.of, orig_s);
} }
oprintf (d.of, "))\n"); oprintf (d.of, "))\n");
if (chain_circular != NULL)
oprintf (d.of, " return;\n do\n");
if (mark_hook_name && !wtd->skip_hooks) if (mark_hook_name && !wtd->skip_hooks)
{ {
oprintf (d.of, " {\n"); oprintf (d.of, " {\n");
@ -2524,7 +2538,22 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
oprintf (d.of, ");\n"); oprintf (d.of, ");\n");
oprintf (d.of, " }\n"); oprintf (d.of, " }\n");
} }
oprintf (d.of, " while (x != xlimit)\n"); if (chain_circular != NULL)
{
oprintf (d.of, " while (%s (xlimit", wtd->marker_routine);
if (wtd->param_prefix)
{
oprintf (d.of, ", xlimit, gt_%s_", wtd->param_prefix);
output_mangled_typename (d.of, orig_s);
output_type_enum (d.of, orig_s);
}
oprintf (d.of, "));\n");
if (mark_hook_name && !wtd->skip_hooks)
oprintf (d.of, " %s (xlimit);\n", mark_hook_name);
oprintf (d.of, " do\n");
}
else
oprintf (d.of, " while (x != xlimit)\n");
} }
oprintf (d.of, " {\n"); oprintf (d.of, " {\n");
if (mark_hook_name && chain_next == NULL && !wtd->skip_hooks) if (mark_hook_name && chain_next == NULL && !wtd->skip_hooks)
@ -2543,6 +2572,8 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
} }
oprintf (d.of, " }\n"); oprintf (d.of, " }\n");
if (chain_circular != NULL)
oprintf (d.of, " while (x != xlimit);\n");
oprintf (d.of, "}\n"); oprintf (d.of, "}\n");
} }

View File

@ -852,7 +852,7 @@
2008-04-01 George Helffrich <george@gcc.gnu.org> 2008-04-01 George Helffrich <george@gcc.gnu.org>
PRs fortran/PR35154, fortran/PR23057 PRs fortran/35154, fortran/23057
* gcc.dg/debug/pr35154.c: New test to check that non-Fortran * gcc.dg/debug/pr35154.c: New test to check that non-Fortran
use of common is unchanged. use of common is unchanged.
@ -2580,6 +2580,10 @@
PR objc++/34193 PR objc++/34193
* obj-c++.dg/gnu-runtime-2.mm: Fix signature of function main(). * obj-c++.dg/gnu-runtime-2.mm: Fix signature of function main().
2008-02-08 Sa Liu <saliu@de.ibm.com>
* gcc.target/spu/intrinsics-3.c: New. Test error messages.
2008-02-06 Alexandre Oliva <aoliva@redhat.com> 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
PR c++/35056 PR c++/35056