Debian Codegraph @

gcc/testsuite/g++.dg/tls/thread_local13.C

raw
1 // PR c++/109164
2 // { dg-do run { target c++11 } }
3 // { dg-options "-O2" }
4 // { dg-add-options tls }
5 // { dg-require-effective-target tls_runtime }
6 // { dg-additional-sources "thread_local13-aux.cc" }
7
8 struct S { virtual void foo (); int s; };
9 extern thread_local S &t;
10 bool bar ();
11
12 bool
13 baz ()
14 {
15 while (1)
16 {
17 t.foo ();
18 if (!bar ())
19 return false;
20 }
21 }