From bcd5532fcb8442d930721f0c8048c764f4cbbf1e Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 22 Feb 2018 16:48:24 +0200 Subject: [PATCH] Fix thread_local test If _Thread_local is used on a block-scope declaration, it must be combined with either static or extern to decide linkage. Change-Id: I228b3520767197c6cdf5134ff5a666ab2aca33ea Reviewed-by: Thiago Macieira --- tests/auto/corelib/global/qglobal/qglobal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/global/qglobal/qglobal.c b/tests/auto/corelib/global/qglobal/qglobal.c index af42efa7f6..0719c4b921 100644 --- a/tests/auto/corelib/global/qglobal/qglobal.c +++ b/tests/auto/corelib/global/qglobal/qglobal.c @@ -110,7 +110,7 @@ Q_STATIC_ASSERT(!!1); static thread_local int gt_var; void thread_local_test() { - thread_local int t_var; + static thread_local int t_var; t_var = gt_var; } #endif