| 1 |
/* Caused ICE in in make_decl_rtl, at varasm.c:1311. */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
|
| 4 |
class A |
| 5 |
{ |
| 6 |
public: |
| 7 |
A () : value (123) {} |
| 8 |
int value; |
| 9 |
}; |
| 10 |
|
| 11 |
template <typename StoredFunction> class B |
| 12 |
{ |
| 13 |
public: |
| 14 |
template <typename F> B (F p1) : mFunction (p1) { mFunction (); } |
| 15 |
StoredFunction mFunction; |
| 16 |
}; |
| 17 |
template <typename Function> |
| 18 |
void |
| 19 |
NS_NewRunnableFunction (Function p1) |
| 20 |
{ |
| 21 |
(B<Function> (p1)); |
| 22 |
} |
| 23 |
class C |
| 24 |
{ |
| 25 |
void DispatchConnectionCloseEvent (A); |
| 26 |
void AsyncCloseConnectionWithErrorMsg (const A &); |
| 27 |
}; |
| 28 |
void |
| 29 |
C::AsyncCloseConnectionWithErrorMsg (const A &) |
| 30 |
{ |
| 31 |
{ |
| 32 |
A message; |
| 33 |
NS_NewRunnableFunction ( |
| 34 |
[this, message] { DispatchConnectionCloseEvent (message); }); |
| 35 |
} |
| 36 |
} |