On Fri, Nov 22, 2024 at 5:11 PM <jann...@gnu.org> wrote: > Sounds awfully familiar...so is this a compiler bug?
What, did you think if was *my* code that's broken? :D :D :D > How should I go > forward here? Most importantly, please report this to GCC developers. You could use the preprocessed source so they don't have to build all of glibc to reproduce this. And you could try to reduce the file, cutting out unneeded declarations, to find a much smaller example that reproduces the issue. > Could/should I do/try something like this? > > # define THREAD_SETMEM(descr, member, value) \ > (*(__typeof (descr->member) __seg_fs *) offsetof (tcbhead_t, member) = > value);\ > asm ("nop") Well, we have no idea why the nop helps here, and whether or not it would help in any other place where this macro is used, or maybe on the contrary make things worse. So I would only build with a patch that adds the nop in this specific place, and watch out for any other failing tests. You could also try to steal the old asm-based versions of these macros from the NPTL version at sysdeps/x86_64/nptl/tcb-access.h, replacing 'struct pthread' with 'tcbhead_t'. Sergey