diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-04-27 09:11:57 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-04-27 09:11:57 +0200 |
commit | 9612a4833d761e3beda083a3e4dc92feba3b01bc (patch) | |
tree | 1b6abde8dd48e66b39e424189419670f328cd1e9 | |
parent | 47c39faa67cc7bd567793b62718ab5e4f931e8d0 (diff) | |
download | gcc-9612a4833d761e3beda083a3e4dc92feba3b01bc.zip gcc-9612a4833d761e3beda083a3e4dc92feba3b01bc.tar.gz gcc-9612a4833d761e3beda083a3e4dc92feba3b01bc.tar.bz2 |
s390: Fix C++14 vs. C++17 ABI incompatibility on s390{,x} [PR94704]
The following patch fixes the C++14 vs. C++17 ABI passing incompatibility
on s390x-linux.
Bootstrapped/regtested on s390x-linux without and with the patch, the
difference being:
-FAIL: tmpdir-g++.dg-struct-layout-1/t032 cp_compat_x_alt.o-cp_compat_y_tst.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t032 cp_compat_x_tst.o-cp_compat_y_alt.o execute
-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/t055 cp_compat_x_alt.o-cp_compat_y_alt.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t055 cp_compat_x_alt.o-cp_compat_y_tst.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t055 cp_compat_x_tst.o-cp_compat_y_alt.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t055 cp_compat_x_tst.o-cp_compat_y_tst.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t056 cp_compat_x_alt.o-cp_compat_y_alt.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t056 cp_compat_x_alt.o-cp_compat_y_tst.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t056 cp_compat_x_tst.o-cp_compat_y_alt.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t056 cp_compat_x_tst.o-cp_compat_y_tst.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t057 cp_compat_x_alt.o-cp_compat_y_alt.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t057 cp_compat_x_alt.o-cp_compat_y_tst.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t057 cp_compat_x_tst.o-cp_compat_y_alt.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t057 cp_compat_x_tst.o-cp_compat_y_tst.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t058 cp_compat_x_alt.o-cp_compat_y_alt.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t058 cp_compat_x_alt.o-cp_compat_y_tst.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t058 cp_compat_x_tst.o-cp_compat_y_alt.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_alt.o-cp_compat_y_alt.o execute
FAIL: tmpdir-g++.dg-struct-layout-1/t059 cp_compat_x_alt.o-cp_compat_y_tst.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t059 cp_compat_x_tst.o-cp_compat_y_alt.o execute
-FAIL: tmpdir-g++.dg-struct-layout-1/t059 cp_compat_x_tst.o-cp_compat_y_tst.o execute
when performing ALT_CXX_UNDER_TEST=g++ testing with a system GCC 10 compiler
from a week ago. So, the alt vs. alt FAILs are all expected (we know before
this patch there is an ABI incompatibility) and some alt vs. tst (or tst vs.
alt) FAILs too - that depends on if the particular x or y test is compiled
with -std=c++14 or -std=c++17 - if x_tst is compiled with -std=c++14 and
y_alt is compiled with -std=c++17, then it should FAIL, similarly if x_alt
is compiled with -std=c++17 and y_tst is compiled with -std=c++14.
2020-04-27 Jakub Jelinek <jakub@redhat.com>
PR target/94704
* config/s390/s390.c (s390_function_arg_vector,
s390_function_arg_float): Ignore cxx17_empty_base_field_p fields.
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 477d2a7..ade7418 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-04-27 Jakub Jelinek <jakub@redhat.com> + + PR target/94704 + * config/s390/s390.c (s390_function_arg_vector, + s390_function_arg_float): Ignore cxx17_empty_base_field_p fields. + 2020-04-27 Jiufu Guo <guojiufu@cn.ibm.com> * common/config/rs6000/rs6000-common.c diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index b6bc334..e282bb8c 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -11917,7 +11917,8 @@ s390_function_arg_vector (machine_mode mode, const_tree type) for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) { - if (TREE_CODE (field) != FIELD_DECL) + if (TREE_CODE (field) != FIELD_DECL + || cxx17_empty_base_field_p (field)) continue; if (single == NULL_TREE) @@ -11967,7 +11968,8 @@ s390_function_arg_float (machine_mode mode, const_tree type) for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) { - if (TREE_CODE (field) != FIELD_DECL) + if (TREE_CODE (field) != FIELD_DECL + || cxx17_empty_base_field_p (field)) continue; if (single == NULL_TREE) |