From: Paul Thomas Date: Fri, 31 Mar 2006 00:47:13 +0000 (+0200) Subject: re PR fortran/21130 (38822 lines of Fortran 90 takes more than 10 minutes to compile... X-Git-Tag: releases/gcc-4.2.0~3479 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=264364930785b7f8a6cce1dcbe375f7010ce1e9b;p=thirdparty%2Fgcc.git 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 Bud Davis PR 21130 * module.c (load_needed): Traverse entire tree before returning. Co-Authored-By: Bud Davis From-SVN: r112558 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index e1d1d30ff9f9..7d862357abff 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2006-03-30 Paul Thomas + Bud Davis + + PR 21130 + * module.c (load_needed): Traverse entire tree before returning. + 2006-03-30 Roger Sayle PR middle-end/22375 diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 0acc47480034..9949ccd4f2d8 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;