* mangle.c (find_substitution): Do not use special substitutions
for identifiers not in std::.
PR c++/16171
* g++.dg/abi/mangle26.C: New test.
* g++.dg/abi/mangle27.C: New test.
* g++.dg/abi/mangle28.C: New test.
* g++.dg/abi/mangle29.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104228
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-09-13 Bastian Blank <waldi@debian.org>
+
+ PR c++/16171
+ * mangle.c (find_substitution): Do not use special substitutions
+ for identifiers not in std::.
+
2005-09-13 Mark Mitchell <mark@codesourcery.com>
PR c++/23839
SUBID_CHAR_TRAITS))
{
/* Got them. Is this basic_istream? */
- tree name = DECL_NAME (CLASSTYPE_TI_TEMPLATE (type));
- if (name == subst_identifiers[SUBID_BASIC_ISTREAM])
+ if (is_std_substitution (decl, SUBID_BASIC_ISTREAM))
{
write_string ("Si");
return 1;
}
/* Or basic_ostream? */
- else if (name == subst_identifiers[SUBID_BASIC_OSTREAM])
+ else if (is_std_substitution (decl, SUBID_BASIC_OSTREAM))
{
write_string ("So");
return 1;
}
/* Or basic_iostream? */
- else if (name == subst_identifiers[SUBID_BASIC_IOSTREAM])
+ else if (is_std_substitution (decl, SUBID_BASIC_IOSTREAM))
{
write_string ("Sd");
return 1;
-2005-09-13 Mark Mitchell <mark@codesourcery.com>
+2005-09-13 Bastian Blank <waldi@debian.org>
+
+ PR c++/16171
+ * g++.dg/abi/mangle26.C: New test.
+ * g++.dg/abi/mangle27.C: New test.
+ * g++.dg/abi/mangle28.C: New test.
+ * g++.dg/abi/mangle29.C: New test.
PR c++/23839
* g++.dg/parse/register1.C: New test.
--- /dev/null
+// Test of std mangling
+
+// { dg-do compile }
+// { dg-options "-fno-inline" }
+
+namespace std {
+ struct A {
+ virtual void f () { }
+ };
+}
+
+std::A a;
+
+// { dg-final { scan-assembler "\n_?_ZNSt1AC1Ev\[: \t\n\]" } }
--- /dev/null
+// Test of std::basic_iostream<char, std::char_traits<char> > mangling
+
+// { dg-do compile }
+// { dg-options "-fno-inline" }
+
+namespace std {
+ template<typename> struct char_traits;
+
+ template<typename, typename> struct basic_iostream { basic_iostream(){} };
+}
+
+std::basic_iostream<char,std::char_traits<char> > s1;
+
+// { dg-final { scan-assembler "\n_?_ZNSdC1Ev\[: \t\n\]" } }
--- /dev/null
+// Test of std::basic_istream<char, std::char_traits<char> > mangling
+
+// { dg-do compile }
+// { dg-options "-fno-inline" }
+
+namespace std {
+ template<typename> struct char_traits;
+
+ template<typename, typename> struct basic_istream { basic_istream(){} };
+}
+
+std::basic_istream<char,std::char_traits<char> > s1;
+
+// { dg-final { scan-assembler "\n_?_ZNSiC1Ev\[: \t\n\]" } }
--- /dev/null
+// Test of std::basic_ostream<char, std::char_traits<char> > mangling
+
+// { dg-do compile }
+// { dg-options "-fno-inline" }
+
+namespace std {
+ template<typename> struct char_traits;
+
+ template<typename, typename> struct basic_ostream { basic_ostream(){} };
+}
+
+std::basic_ostream<char,std::char_traits<char> > s1;
+
+// { dg-final { scan-assembler "\n_?_ZNSoC1Ev\[: \t\n\]" } }