Blame SOURCES/gcc32-demangle-pr16240.patch

727081
2004-06-28  Ian Lance Taylor  <ian@wasabisystems.com>
727081
727081
	PR other/16240
727081
	* cp-demangle.c (d_expr_primary): Check for a failure return from
727081
	cplus_demangle_type.
727081
	* testsuite/demangle-expected: Add test case.
727081
727081
--- libiberty/cp-demangle.c	25 Feb 2004 04:51:37 -0000	1.73
727081
+++ libiberty/cp-demangle.c	28 Jun 2004 15:23:33 -0000	1.74
727081
@@ -2398,6 +2398,8 @@ d_expr_primary (di)
727081
       const char *s;
727081
 
727081
       type = cplus_demangle_type (di);
727081
+      if (type == NULL)
727081
+	return NULL;
727081
 
727081
       /* If we have a type we know how to print, we aren't going to
727081
 	 print the type name itself.  */
727081
--- libiberty/testsuite/demangle-expected	25 Feb 2004 04:51:39 -0000	1.30
727081
+++ libiberty/testsuite/demangle-expected	28 Jun 2004 17:36:27 -0000	1.31
727081
@@ -3699,6 +3699,11 @@ _Z3fooIPA3_iEvRKT_
727081
 void foo<int (*) [3]>(int (* const&) [3])
727081
 foo<int (*) [3]>
727081
 #
727081
+# This used to crash the demangler--PR 16240
727081
+--format=gnu-v3 --no-params
727081
+_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
727081
+_ZN13PatternDriver23StringScalarDeleteValueC1ERKNS_25ConflateStringScalarValueERKNS_25AbstractStringScalarValueERKNS_12TemplateEnumINS_12pdcomplementELZNS_16complement_namesEELZNS_14COMPLEMENTENUMEEEE
727081
+PatternDriver::StringScalarDeleteValue::StringScalarDeleteValue
727081
 # Test GNU V3 constructor and destructor identification.
727081
 # 0 means it is not a constructor/destructor.
727081
 # Other integers correspond to enum gnu_v3_{c,d}tor_kinds in demangle.h.