2 // { dg-additional-options "-std=c++14" }
3 // { dg-require-effective-target alloca }
6 typedef __SIZE_TYPE__ size_t;
9 namespace vespamalloc {
11 template <typename> class A {
13 static unsigned long fillStack(unsigned long);
15 template <typename StackRep>
16 unsigned long A<StackRep>::fillStack(unsigned long p1) {
25 template <int StackTraceLen> class D : B {
28 void alloc(int) { A<int>::fillStack(StackTraceLen); }
30 template <typename, typename> class C {
32 void *malloc(unsigned long);
34 template <typename MemBlockPtrT, typename ThreadListT>
35 void *C<MemBlockPtrT, ThreadListT>::malloc(unsigned long) {
40 C<D<16>, int> *_GmemP;
42 void *operator new(std::size_t, std::nothrow_t &) noexcept {
43 return vespamalloc::_GmemP->malloc(0);
45 void *operator new[](std::size_t, std::nothrow_t &) noexcept {
46 return vespamalloc::_GmemP->malloc(0);