diff options
Diffstat (limited to 'test/OpenMP/task_firstprivate_messages.cpp')
-rw-r--r-- | test/OpenMP/task_firstprivate_messages.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/OpenMP/task_firstprivate_messages.cpp b/test/OpenMP/task_firstprivate_messages.cpp index ef5f3856430a..11d8c5789879 100644 --- a/test/OpenMP/task_firstprivate_messages.cpp +++ b/test/OpenMP/task_firstprivate_messages.cpp @@ -7,6 +7,17 @@ bool foobool(int argc) { return argc; } +template <typename T> +struct S { + T b; + S(T a, T c) { +#pragma omp task default(none) firstprivate(a, b) + a = b = c; // expected-error {{variable 'c' must have explicitly specified data sharing attributes}} + } +}; + +S<int> s(3, 4); // expected-note {{in instantiation of member function 'S<int>::S' requested here}} + struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}} extern S1 a; class S2 { |