Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/tls/pr85400.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 // PR c++/85400 | |
2 // Testcase by Brian Vandenberg <phantall@gmail.com> | |
3 | |
4 // { dg-do link { target c++11 } } | |
5 // { dg-require-effective-target fpic } | |
6 // { dg-require-effective-target shared } | |
7 // { dg-require-effective-target tls } | |
8 // { dg-options "-shared -fPIC -O" } | |
9 // { dg-add-options tls } | |
10 | |
11 struct Test | |
12 { | |
13 int blah (int y) | |
14 { | |
15 thread_local int mything = 3; | |
16 mything = y > 0 ? y : mything; | |
17 return mything; | |
18 } | |
19 }; | |
20 | |
21 int stuff (Test& test, int y) | |
22 { | |
23 return test.blah(y); | |
24 } |