]> git.ipfire.org Git - thirdparty/gcc.git/commit
MinGW: Reject dll{im,ex}port attribute on TLS variables
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 9 Feb 2026 18:12:28 +0000 (19:12 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 9 Feb 2026 18:14:13 +0000 (19:14 +0100)
commitbf0fd736a96fc8560d44f808bb1c27c13e99fa78
tree9682d415c12788a95d9dfa25621cff389fd5c7d7
parenta2e2fdf2f52c0d73e63a3005db459b4fa09bec7f
MinGW: Reject dll{im,ex}port attribute on TLS variables

The same error is given by Clang/LLVM.

gcc/
PR target/80881
* attribs.cc (handle_dll_attribute): If TARGET_WIN32_TLS is 1,
issue an error if either attribute is set on a TLS variable.

gcc/testsuite/
* c-c++-common/tls-attr-dll.c: New test.
gcc/attribs.cc
gcc/testsuite/c-c++-common/tls-attr-dll.c [new file with mode: 0644]