mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-07 10:40:43 +08:00
As mentioned in the PR and on IRC, the recently added struct-layout-1.exp new tests FAIL on powerpc64le-linux (among other targets). FAIL: tmpdir-g++.dg-struct-layout-1/t032 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t058 cp_compat_x_tst.o-cp_compat_y_tst.o execute FAIL: tmpdir-g++.dg-struct-layout-1/t059 cp_compat_x_tst.o-cp_compat_y_tst.o execute in particular. The problem is that the presence or absence of the C++17 artificial empty base fields, which have non-zero TYPE_SIZE, but zero DECL_SIZE, change the ABI decisions, if it is present (-std=c++17), the type might not be considered homogeneous, while if it is absent (-std=c++14), it can be. The following patch fixes that and emits a -Wpsabi inform; perhaps more often than it could, because the fact that rs6000_discover_homogeneous_aggregate returns true when it didn't in in GCC 7/8/9 with -std=c++17 doesn't still mean it will make a different ABI decision, but the warning triggered only on the test I've changed (the struct-layout-1.exp tests use -w -Wno-psabi already). 2020-04-23 Jakub Jelinek <jakub@redhat.com> PR target/94707 * config/rs6000/rs6000-call.c (rs6000_aggregate_candidate): Add cxx17_empty_base_seen argument. Pass it to recursive calls. Ignore cxx17_empty_base_field_p fields after setting *cxx17_empty_base_seen to true. (rs6000_discover_homogeneous_aggregate): Adjust rs6000_aggregate_candidate caller. With -Wpsabi, diagnose homogeneous aggregates with C++17 empty base fields. * g++.dg/tree-ssa/pr27830.C: Use -Wpsabi -w for -std=c++17 and higher.
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
31.9%
C
31.3%
Ada
12%
D
6.5%
Go
6.4%
Other
11.5%