This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/45603] cc1plus crashes in "build_addr_func"



------- Comment #11 from jakub at gcc dot gnu dot org  2010-09-09 10:28 -------
template<typename T>
struct Singleton
{
  static T* get()
  {
    static T instance;
    return &instance;
  }
  ~Singleton() {}
};

struct Foo : Singleton<Foo>
{
};

#ifdef __ARM_EABI__
typedef int __guard;
#else
typedef int __guard __attribute__((mode(DI)));
#endif
extern "C" int __cxa_guard_acquire(__guard *)
{
}
extern "C" void __cxa_guard_release(__guard *) throw()
{
}
extern "C" void __cxa_guard_abort(__guard *) throw()
{
}

void foo()
{
  Foo::get();
}

compiles just fine.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45603


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]