&& DECL_DECLARED_CONSTEXPR_P (current_function_decl))
{
bool ok = false;
- if (CP_DECL_THREAD_LOCAL_P (decl))
+ if (CP_DECL_THREAD_LOCAL_P (decl) && !DECL_REALLY_EXTERN (decl))
error_at (DECL_SOURCE_LOCATION (decl),
"%qD declared %<thread_local%> in %<constexpr%> function",
decl);