On Wed, 30 Jul 2025, H.J. Lu wrote:
> According to the TLS spec, linker can optimize the TLS access by > overriding the TLS access model. Do the same in compiler by using > the default TLS mode if it is more optimized than the TLS model > attribute. > > gcc/ > > PR c/121318 > * doc/extend.texi: Update the tls_model attribute. > > gcc/c-family/ > > PR c/121318 > * c-attribs.cc (handle_tls_model_attribute): Use the default TLS > mode if it is more optimized. > > gcc/testsuite/ > > PR c/121318 > * gcc.dg/tls/pr121318.c: New test. We have a few pre-existing tests that verify that the attribute is honored, such as those added by commit 1d561e1851c4. Do they actually not fail with this patch? https://gcc.gnu.org/cgit/gcc/commit/?id=1d561e1851c466a4952081caef17747781609b00 Thanks. Alexander