method.c (build_mangled_name): Protect flush_repeats() from error_mark_node.
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 5 Feb 2001 17:15:33 +0000 (17:15 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Mon, 5 Feb 2001 17:15:33 +0000 (17:15 +0000)
* method.c (build_mangled_name) [old abi]: Protect flush_repeats()
from error_mark_node.

From-SVN: r39460

gcc/cp/ChangeLog
gcc/cp/method.c

index 04d64a0c824c7ae5eb6e6362a6c9ff3bcaf52637..72bc2f07435060a0aae254657895d088661914c8 100644 (file)
@@ -1,3 +1,8 @@
+2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
+
+       * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
+       from error_mark_node.
+
 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
 
        Fix specification and implementation bugs in V3 ABI
index 51e0c5c3cb963da517543fd456b41abdd0ff3290..30ede1b600a5e1f36f934e48274cc1195fc5e355 100644 (file)
@@ -1213,6 +1213,16 @@ build_mangled_name (parmtypes, begin, end)
              nrepeats = 0;
            }
          
+         /* Insead of protecting flush_repeats() against
+            error_mark_node, we can do it here.  Since we wouldn't
+            add anything for an ERROR_MARK anyway, it's ok to skip
+            the mangling for this type.  */
+         if (old_style_repeats && parmtype == error_mark_node)
+           {
+             last_type = NULL_TREE;
+             continue;
+           }
+
          last_type = parmtype;
 
          /* Note that for bug-compatibility with 2.7.2, we can't build up