diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2008-09-17 17:57:24 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2008-09-17 10:57:24 -0700 |
commit | 52a764acf76949daf594c2a030fa20c8383946c8 (patch) | |
tree | 9c08f324266332617ef2472a31e2ceff3e0b5a07 /gcc/cp/name-lookup.c | |
parent | 118dde55d874964faccb055568cacf784b923fde (diff) | |
download | gcc-52a764acf76949daf594c2a030fa20c8383946c8.zip gcc-52a764acf76949daf594c2a030fa20c8383946c8.tar.gz gcc-52a764acf76949daf594c2a030fa20c8383946c8.tar.bz2 |
re PR c++/37450 (C++ FE times out on duplicated parameter)
2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
PR c++/37450
* name-lookup.c (pushdecl_maybe_friend): Don't return the old
parameter for duplicate.
From-SVN: r140425
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index a7c5be4..946b321 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -720,8 +720,9 @@ pushdecl_maybe_friend (tree x, bool is_friend) else if (TREE_CODE (t) == PARM_DECL) { /* Check for duplicate params. */ - if (duplicate_decls (x, t, is_friend)) - POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, t); + tree d = duplicate_decls (x, t, is_friend); + if (d) + POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, d); } else if ((DECL_EXTERN_C_FUNCTION_P (x) || DECL_FUNCTION_TEMPLATE_P (x)) |