https://bugs.llvm.org/show_bug.cgi?id=45124

            Bug ID: 45124
           Summary: clang-10 regression with __thread and deduction guides
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: dma...@mozilla.com
                CC: froy...@gmail.com, htmldevelo...@gmail.com,
                    llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk, sylves...@debian.org
            Blocks: 44555

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

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

__thread c<a> g1;

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

__thread c<a> 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.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=44555
[Bug 44555] [meta] 10.0.0 Release Blockers
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to