From 59ea9fe7b61c424fc1e45039a6c3a9af0966965b Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 19 Feb 2002 21:01:40 +0000 Subject: merge from gcc --- libiberty/cplus-dem.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libiberty/cplus-dem.c') diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c index 710b69d..203e30d 100644 --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -2414,8 +2414,15 @@ demangle_arm_hp_template (work, mangled, n, declp) break; default: /* Not handling other HP cfront stuff */ - if (!do_type (work, &args, &arg)) - goto cfront_template_args_done; + { + const char* old_args = args; + if (!do_type (work, &args, &arg)) + goto cfront_template_args_done; + + /* Fail if we didn't make any progress: prevent infinite loop. */ + if (args == old_args) + return; + } } string_appends (declp, &arg); string_append (declp, ","); -- cgit v1.1