On Mon, 30 Sept 2024 at 18:26, Frank Scheiner wrote: > > We see: > > ``` > FAIL: 17_intro/names.cc -std=gnu++17 (test for excess errors) > FAIL: 17_intro/names_pstl.cc -std=gnu++17 (test for excess errors) > FAIL: experimental/names.cc -std=gnu++17 (test for excess errors) > ``` > > ...on ia64-linux. > > This is due to: > > * /usr/include/bits/sigcontext.h:32-38: > ``` > 32 struct __ia64_fpreg > 33 { > 34 union > 35 { > 36 unsigned long bits[2]; > 37 } u; > 38 } __attribute__ ((__aligned__ (16))); > ``` > > * /usr/include/sys/ucontext.h:39-45: > ``` > 39 struct __ia64_fpreg_mcontext > 40 { > 41 union > 42 { > 43 unsigned long __ctx(bits)[2]; > 44 } __ctx(u); > 45 } __attribute__ ((__aligned__ (16))); > ``` > > ...from glibc 2.39 (w/ia64 support re-added). See the discussion > starting on [1]. > > [1]: https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654487.html > > The following patch adds a workaround for this on the libstdc++ > testsuite side.
Thanks for the patch. Please CC libstd...@gcc.gnu.org for all libstdc++ patches, as per https://gcc.gnu.org/lists.html It looks like the glibc header also defines "bits" without using the implementation namespace. Is there a reason the re-added ia64 code in the glibc header can't be fixed to use __bits and __u? Is there software expecting to access those fields directly? > > Signed-off-by: Frank Scheiner <frank.schei...@web.de> > --- > libstdc++-v3/testsuite/17_intro/names.cc | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/libstdc++-v3/testsuite/17_intro/names.cc > b/libstdc++-v3/testsuite/17_intro/names.cc > index 9b0ffcb50b2..b45aefe1ccf 100644 > --- a/libstdc++-v3/testsuite/17_intro/names.cc > +++ b/libstdc++-v3/testsuite/17_intro/names.cc > @@ -265,6 +265,12 @@ > #undef j > #endif > > +#if defined (__linux__) && defined (__ia64__) > +// <bits/sigcontext.h> defines __ia64_fpreg::u > +// <sys/ucontext.h> defines __ia64_fpreg_mcontext::u > +#undef u > +#endif > + > #if defined (__linux__) && defined (__powerpc__) > // <asm/types.h> defines __vector128::u > #undef u > -- > 2.45.2 >