gcc/libstdc++-v3/testsuite/17_intro
Jakub Jelinek cf5f779105 libstdc++: Workaround kernel-headers on s390x-linux
We see
FAIL: 17_intro/headers/c++1998/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2011/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2014/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2017/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/headers/c++2020/all_attributes.cc   (test for excess errors)
FAIL: 17_intro/names.cc  -std=gnu++17 (test for excess errors)
on s390x-linux.
The first 5 are due to kernel-headers not using uglified attribute names,
where <asm/types.h> contains
__attribute__((packed, aligned(4)))
I've filed a downstream bugreport for this in
https://bugzilla.redhat.com/show_bug.cgi?id=2276084
(not really sure where to report kernel-headers issues upstream), while the
last one is due to <sys/ucontext.h> from glibc containing:
  #ifdef __USE_MISC
  # define __ctx(fld) fld
  #else
  # define __ctx(fld) __ ## fld
  #endif
  ...
  typedef union
    {
      double  __ctx(d);
      float   __ctx(f);
    } fpreg_t;
and g++ predefining -D_GNU_SOURCE which implies define __USE_MISC.

The following patch adds a workaround for this on the libstdc++ testsuite
side.

2024-04-22  Jakub Jelinek  <jakub@redhat.com>

	* testsuite/17_intro/names.cc (d, f): Undefine on s390*-linux*.
	* testsuite/17_intro/headers/c++1998/all_attributes.cc (packed): Don't
	define on s390.
	* testsuite/17_intro/headers/c++2011/all_attributes.cc (packed):
	Likewise.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc (packed):
	Likewise.
	* testsuite/17_intro/headers/c++2017/all_attributes.cc (packed):
	Likewise.
	* testsuite/17_intro/headers/c++2020/all_attributes.cc (packed):
	Likewise.
2024-04-22 18:00:06 +02:00
..
headers libstdc++: Workaround kernel-headers on s390x-linux 2024-04-22 18:00:06 +02:00
badnames.cc Update copyright years. 2024-01-03 12:19:35 +01:00
freestanding.cc Update copyright years. 2024-01-03 12:19:35 +01:00
names.cc libstdc++: Workaround kernel-headers on s390x-linux 2024-04-22 18:00:06 +02:00
names_pstl.cc libstdc++: Make names_pstl.cc require et tbb_backend 2023-02-16 12:35:13 +00:00
no_library_allocation.cc libstdc++: Fix tests relying on operator new/delete overload 2023-08-23 06:35:24 +02:00
shared_with_static_deps.cc Update copyright years. 2024-01-03 12:19:35 +01:00
static.cc Update copyright years. 2024-01-03 12:19:35 +01:00
tag_type_explicit_ctor.cc Update copyright years. 2024-01-03 12:19:35 +01:00
using_namespace_std.cc Update copyright years. 2024-01-03 12:19:35 +01:00
using_namespace_std_exp_neg.cc Update copyright years. 2024-01-03 12:19:35 +01:00
using_namespace_std_tr1_neg.cc Update copyright years. 2024-01-03 12:19:35 +01:00
versionconflict.cc libstdc++: Add a test for <version> FTM redefinitions 2023-04-05 18:45:14 +02:00