Skip to content

clang-10 regression with __thread and deduction guides #44469

@llvmbot

Description

@llvmbot
Bugzilla Link 45124
Resolution FIXED
Resolved on Mar 11, 2020 03:39
Version 10.0
OS Windows NT
Blocks #43900
Reporter LLVM Bugzilla Contributor
CC @froydnj,@zmodem,@zygoloid,@sylvestre

Extended Description

https://godbolt.org/z/9rQ5Mi

template class a { int d; };
template <template class b> class c : b {} ;

__thread c g1;

struct x { ~x(); };
template class y { y(x = x()); };
template y(z)->y;

__thread c g2;

g1 compiles fine, but when a deduction guide is introduced, g2 gives an error: initializer for thread-local variable must be a constant expression even though the deduction guide's classes have nothing to do with the __thread variable's classes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions