summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog29
-rw-r--r--gcc/doc/gty.texi5
-rw-r--r--gcc/dwarf2out.c2
-rw-r--r--gcc/fortran/ChangeLog1
-rw-r--r--gcc/gengtype.c35
-rw-r--r--gcc/testsuite/ChangeLog6
6 files changed, 55 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d3eec1e864..b8392545ac5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
PR tree-optimization/36066
@@ -78,7 +87,7 @@
* config/vxworks.c: Include tree.h.
(vxworks_emutls_var_fields, vxworks_emutls_var_init): New.
(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>
@@ -2190,10 +2199,7 @@
2008-04-01 George Helffrich <george@gcc.gnu.org>
- PR fortran/PR35154, fortran/PR23057
- * fortran/trans-common.c (create_common): Add decl to function
- chain to preserve identifier scope in debug output.
-
+ PR fortran/35154, fortran/23057
* dbxout.c: Emit .stabs debug info for Fortran COMMON block
variables as base symbol name + offset using N_BCOMM/N_ECOMM.
(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.
(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>
PR c/35436
@@ -6040,7 +6034,6 @@
* config/spu/spu-builtins.def: Fixed wrong parameter type in spu
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>
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi
index 2ffa1519429..c063d0184e3 100644
--- a/gcc/doc/gty.texi
+++ b/gcc/doc/gty.texi
@@ -316,8 +316,10 @@ escape.
@findex chain_next
@findex chain_prev
+@findex chain_circular
@item chain_next ("@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
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
linked lists, use only @code{chain_next}; for doubly linked lists, use
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
@item reorder ("@var{function name}")
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 83b3fb5aa83..cdf5250b49d 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3837,7 +3837,7 @@ DEF_VEC_ALLOC_O(dw_attr_node,gc);
The children of each node form a circular list linked by
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;
char *die_symbol;
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index dbe52c3ff1a..84e8f7b0128 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -227,6 +227,7 @@
2008-04-01 George Helffrich <george@gcc.gnu.org>
+ PR fortran/35154, fortran/23057
* trans-common.c (create_common): Add decl to function
chain to preserve identifier scope in debug output.
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index bce0c3df79f..aef52e2cdca 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -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_circular") == 0)
+ ;
else if (strcmp (oo->name, "reorder") == 0)
;
else
@@ -2414,6 +2416,7 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
int i;
const char *chain_next = NULL;
const char *chain_prev = NULL;
+ const char *chain_circular = NULL;
const char *mark_hook_name = NULL;
options_p opt;
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;
else if (strcmp (opt->name, "chain_prev") == 0)
chain_prev = opt->info;
+ else if (strcmp (opt->name, "chain_circular") == 0)
+ chain_circular = opt->info;
else if (strcmp (opt->name, "mark_hook") == 0)
mark_hook_name = opt->info;
if (chain_prev != NULL && chain_next == NULL)
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.cookie = wtd;
@@ -2481,7 +2490,10 @@ write_func_for_structure (type_p orig_s, type_p s, type_p *param,
}
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)
{
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);
}
oprintf (d.of, "))\n");
+ if (chain_circular != NULL)
+ oprintf (d.of, " return;\n do\n");
if (mark_hook_name && !wtd->skip_hooks)
{
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, " 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");
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");
+ if (chain_circular != NULL)
+ oprintf (d.of, " while (x != xlimit);\n");
oprintf (d.of, "}\n");
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c15f9739ac6..70a716a6907 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -852,7 +852,7 @@
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
use of common is unchanged.
@@ -2580,6 +2580,10 @@
PR objc++/34193
* 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>
PR c++/35056