Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/tls/diag-2.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
/* Invalid __thread specifiers. */ /* { dg-require-effective-target tls } */ __thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */ __thread static int g2; /* { dg-error "'__thread' before 'static'" } */ __thread __thread int g3; /* { dg-error "duplicate '__thread'" } */ typedef __thread int g4; /* { dg-error "multiple storage classes" } */ void foo() { __thread int l1; /* { dg-error "3:function-scope .l1. implicitly auto and declared '__thread'" } */ auto __thread int l2; /* { dg-error "multiple storage classes|data types" } */ __thread extern int l3; /* { dg-error "'__thread' before 'extern'" } */ register __thread int l4; /* { dg-error "multiple storage classes" } */ } /* { dg-error "ISO C\\+\\+17 does not allow 'register' storage class specifier" "" { target c++17 } .-1 } */ __thread void f1 (); /* { dg-error "1:storage class .__thread. invalid for function" } */ extern __thread void f2 (); /* { dg-error "8:storage class .__thread. invalid for function" } */ static __thread void f3 (); /* { dg-error "8:storage class .__thread. invalid for function" } */ __thread void f4 () { } /* { dg-error "1:storage class .__thread. invalid for function" } */ void bar(__thread int p1); /* { dg-error "10:storage class specified for parameter" } */ struct A { __thread int i; /* { dg-error "3:storage class specified" } */ };