PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / rtti / tinfo1.C
blobbd379aacef313304d29e84fbedf30da7427d9fbc
1 // Test if a local definition is in a linkonce/comdat section.
2 // { dg-do compile }
3 // { dg-final { scan-assembler "_ZTIP9CTemplateIhE\[: \t\n\]" } }
4 // { dg-final { scan-assembler-not "(.globl|.global)\[  \]+_ZTIP9CTemplateIhE" } }
5 // { dg-final { scan-assembler-not ".section\[^\n\r\]*_ZTIP9CTemplateIhE\[^\n\r\]*" } }
8 namespace std
10   class type_info
11   {
12   protected:
13     const char *__name;
15   protected:
16     explicit type_info(const char *__n): __name(__n) { }
18   public:
19     const char* name() const
20     { return __name; }
21   };
24 template<class TYPE>
25 class CTemplate
29 class CSecondModule {
30 public:
31   CSecondModule();
33 private:
34   const CTemplate<unsigned char> *m_variable; typedef CTemplate<unsigned char> m_variable_type;
37 CSecondModule::CSecondModule()
39   typeid(const_cast<m_variable_type *>(m_variable)).name() != 0;