pr77285-2.C: Require tls_native support.
[gcc.git] / gcc / testsuite / g++.dg / pr61094.C
1 /* { dg-do compile } */
2 /* { dg-options "-O3" } */
3
4 template <typename> struct A {
5 unsigned _width, _height, _depth, _spectrum;
6 template <typename t> A(t p1) {
7 int a = p1.size();
8 if (a) {
9 _width = p1._width;
10 _depth = _height = _spectrum = p1._spectrum;
11 }
12 }
13 long size() { return (long)_width * _height * _depth * _spectrum; }
14 };
15
16 int d;
17 void fn1(void *);
18 A<int> *fn2();
19 void fn3() {
20 int b;
21 for (;;) {
22 A<char> c(*fn2());
23 fn1(&c);
24 if (d || !b)
25 throw;
26 }
27 }
28
29
30
31