aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-09-29 23:34:33 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-09-29 23:34:33 +0200
commitdf4b9cfe50b434e67e4d47f7725aa8e37f778e50 (patch)
treea31c32203ff6d0e6114f2c5ebf7d2f5b3387aa4f /gcc/c-decl.c
parent8d2c775f0175a71fefe00156505c9f5c50af4114 (diff)
downloadgcc-df4b9cfe50b434e67e4d47f7725aa8e37f778e50.zip
gcc-df4b9cfe50b434e67e4d47f7725aa8e37f778e50.tar.gz
gcc-df4b9cfe50b434e67e4d47f7725aa8e37f778e50.tar.bz2
re PR middle-end/24109 (non unit-at-a-time failure with compound literals)
PR middle-end/24109 * c-decl.c (c_write_global_declarations_1): If any wrapup_global_declaration_2 call returned true, restart the loop. * gcc.c-torture/execute/20050929-1.c: New test. From-SVN: r104794
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 49c8904..9c2e829 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -7548,6 +7548,7 @@ static void
c_write_global_declarations_1 (tree globals)
{
tree decl;
+ bool reconsider;
/* Process the decls in the order they were written. */
for (decl = globals; decl; decl = TREE_CHAIN (decl))
@@ -7566,9 +7567,18 @@ c_write_global_declarations_1 (tree globals)
}
wrapup_global_declaration_1 (decl);
- wrapup_global_declaration_2 (decl);
- check_global_declaration_1 (decl);
}
+
+ do
+ {
+ reconsider = false;
+ for (decl = globals; decl; decl = TREE_CHAIN (decl))
+ reconsider |= wrapup_global_declaration_2 (decl);
+ }
+ while (reconsider);
+
+ for (decl = globals; decl; decl = TREE_CHAIN (decl))
+ check_global_declaration_1 (decl);
}
/* A subroutine of c_write_global_declarations Emit debug information for each