| 1 |
// PR c++/60702 |
| 2 |
|
| 3 |
extern "C" void abort (); |
| 4 |
struct S { S () { i = 42; }; int i; }; |
| 5 |
thread_local S s1, s2, s3, s4; |
| 6 |
struct T { static thread_local S u1, u2, u3, u4, u5, u6, u7, u8; int i; } t; |
| 7 |
thread_local S T::u1, T::u2, T::u3, T::u4, T::u5, T::u6, T::u7, T::u8; |
| 8 |
|
| 9 |
S *f1 () { return &s1; } |
| 10 |
int *f2 () { return &s2.i; } |
| 11 |
S *f3 () { return &t.u1; } |
| 12 |
int *f4 () { return &t.u2.i; } |
| 13 |
S *f5 () { return &T::u3; } |
| 14 |
int *f6 () { return &T::u4.i; } |
| 15 |
template <int N> |
| 16 |
S *f7 () { return &s3; } |
| 17 |
template <int N> |
| 18 |
int *f8 () { return &s4.i; } |
| 19 |
template <int N> |
| 20 |
S *f9 () { return &t.u5; } |
| 21 |
template <int N> |
| 22 |
int *f10 () { return &t.u6.i; } |
| 23 |
template <int N> |
| 24 |
S *f11 () { return &T::u7; } |
| 25 |
template <int N> |
| 26 |
int *f12 () { return &T::u8.i; } |