https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71696
--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> --- Author: law Date: Thu Aug 4 16:53:18 2016 New Revision: 239143 URL: https://gcc.gnu.org/viewcvs?rev=239143&root=gcc&view=rev Log: 2016-08-04 Marcel Böhme <boehme.mar...@gmail.com> PR c++/71696 * cplus-dem.c: Prevent infinite recursion when there is a cycle in the referencing of remembered mangled types. (work_stuff): New stack to keep track of the remembered mangled types that are currently being processed. (push_processed_type): New method to push currently processed remembered type onto the stack. (pop_processed_type): New method to pop currently processed remembered type from the stack. (work_stuff_copy_to_from): Copy values of new variables. (delete_non_B_K_work_stuff): Free stack memory. (demangle_args): Push/Pop currently processed remembered type. (do_type): Do not demangle a cyclic reference and push/pop referenced remembered type. Modified: trunk/libiberty/ChangeLog trunk/libiberty/cplus-dem.c trunk/libiberty/testsuite/demangle-expected