diff options
author | Paul Thomas <paulthomas2@wanadoo.fr> | 2006-03-31 02:47:13 +0200 |
---|---|---|
committer | Bud Davis <bdavis@gcc.gnu.org> | 2006-03-31 00:47:13 +0000 |
commit | 264364930785b7f8a6cce1dcbe375f7010ce1e9b (patch) | |
tree | 135a45a2b6cfdd20f19863ee171fa5dd835e8251 /gcc/fortran/module.c | |
parent | d3603e8c4ef5a3fb3f21a5378b2515e81c417450 (diff) | |
download | gcc-264364930785b7f8a6cce1dcbe375f7010ce1e9b.zip gcc-264364930785b7f8a6cce1dcbe375f7010ce1e9b.tar.gz gcc-264364930785b7f8a6cce1dcbe375f7010ce1e9b.tar.bz2 |
re PR fortran/21130 (38822 lines of Fortran 90 takes more than 10 minutes to compile on a dual 3GHz P4 Linux box with lots of RAM)
2006-03-30 Paul Thomas <paulthomas2@wanadoo.fr>
Bud Davis <bdavis9659@sbcglobal.net>
PR 21130
* module.c (load_needed): Traverse entire tree before returning.
Co-Authored-By: Bud Davis <bdavis9659@sbcglobal.net>
From-SVN: r112558
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 0acc474..9949ccd 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -3061,16 +3061,17 @@ load_needed (pointer_info * p) gfc_namespace *ns; pointer_info *q; gfc_symbol *sym; + int rv; + rv = 0; if (p == NULL) - return 0; - if (load_needed (p->left)) - return 1; - if (load_needed (p->right)) - return 1; + return rv; + + rv |= load_needed (p->left); + rv |= load_needed (p->right); if (p->type != P_SYMBOL || p->u.rsym.state != NEEDED) - return 0; + return rv; p->u.rsym.state = USED; |