This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45603] cc1plus crashes in "build_addr_func"
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Sep 2010 10:28:56 -0000
- Subject: [Bug c++/45603] cc1plus crashes in "build_addr_func"
- References: <bug-45603-19514@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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