From dd38686d9c810cecbaa80bb82ed91caaa58ad635 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 7 May 2020 14:56:51 +0200 Subject: [PATCH] testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946] The testcase in the current form doesn't FAIL without the patch on x86_64-linux unless also testing with -m32; as that the 64-bit testing on that target is probably way more common, and we can use also attributes that FAIL without the patch with -m64, the following patch adjusts the test, so that it FAILs without the patch for both -m64 and -m32 (but not -mx32) and PASSes with the patch. 2020-05-07 Jakub Jelinek PR c++/94946 * g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use sysv_abi and ms_abi attributes in that case instead of fastcall and no attribute. --- gcc/ChangeLog | 11 ++++++----- gcc/c/ChangeLog | 5 ++++- gcc/cp/ChangeLog | 7 ++++--- gcc/testsuite/ChangeLog | 18 ++++++++++-------- gcc/testsuite/g++.dg/ext/attr-parm-1.C | 7 ++++++- 5 files changed, 30 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c948d829d6ba..905bd056b2da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,21 +1,22 @@ -2020-05-06 Jakub Jelinek +2020-05-07 Jakub Jelinek + + Backported from mainline + 2020-05-06 Jakub Jelinek PR target/94950 * config/riscv/riscv-builtins.c (riscv_atomic_assign_expand_fenv): Use TARGET_EXPR instead of MODIFY_EXPR for first assignment to old_flags. -2020-05-06 Jakub Jelinek - PR rtl-optimization/94873 * combine.c (combine_instructions): Don't optimize using REG_EQUAL note if SET_SRC (set) has side-effects. -2020-05-05 Jakub Jelinek + 2020-05-05 Jakub Jelinek PR target/94942 * config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv. -2020-05-04 Jakub Jelinek + 2020-05-04 Jakub Jelinek * opts.c (get_option_html_page): Instead of hardcoding a list of options common between C/C++ and Fortran only use gfortran/ diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index c7dbd7d54230..7fb870148da2 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,4 +1,7 @@ -2020-04-30 Jakub Jelinek +2020-05-07 Jakub Jelinek + + Backported from mainline + 2020-04-30 Jakub Jelinek PR c/94842 * c-decl.c (set_labels_context_r): In addition to context-less diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c374c2b7644d..b5201634053c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,12 +1,13 @@ -2020-05-06 Jakub Jelinek +2020-05-07 Jakub Jelinek + + Backported from mainline + 2020-05-06 Jakub Jelinek PR c++/94951 * typeck.c (cp_strict_aliasing_warning): New function. (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use it instead of strict_aliasing_warning. -2020-05-06 Jakub Jelinek - PR c++/94907 * method.c (defaulted_late_check): Don't call synthesize_method on constexpr sfk_comparison if it has been called on it already. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fb3658c62a78..4ae9129a7967 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,29 +1,31 @@ -202-05-07 Jakub Jelinek +2020-05-07 Jakub Jelinek + + PR c++/94946 + * g++.dg/ext/attr-parm-1.C: Enable the test also for lp64 x86, use + sysv_abi and ms_abi attributes in that case instead of fastcall and + no attribute. PR c/94968 * gcc.dg/pr94968.c: New test. -2020-05-06 Jakub Jelinek + Backported from mainline + 2020-05-06 Jakub Jelinek PR c++/94951 * g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test. -2020-05-06 Jakub Jelinek - PR c++/94907 * g++.dg/cpp2a/spaceship-synth8.C: New test. -2020-05-06 Jakub Jelinek - PR rtl-optimization/94873 * gcc.dg/pr94873.c: New test. -2020-05-05 Jakub Jelinek + 2020-05-05 Jakub Jelinek PR target/94942 * gcc.target/i386/pr94942.c: New test. -2020-04-30 Jakub Jelinek + 2020-04-30 Jakub Jelinek PR c/94842 * gcc.dg/pr94842.c: New test. diff --git a/gcc/testsuite/g++.dg/ext/attr-parm-1.C b/gcc/testsuite/g++.dg/ext/attr-parm-1.C index cc53a2ce328b..681a652de1f4 100644 --- a/gcc/testsuite/g++.dg/ext/attr-parm-1.C +++ b/gcc/testsuite/g++.dg/ext/attr-parm-1.C @@ -1,6 +1,11 @@ -// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } +// { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ia32 || lp64 } } } } // PR 94946 class a { +#ifdef __LP64__ + template a(b(__attribute__((sysv_abi)) *c)()); + template a(b(__attribute__((ms_abi)) *c)()); +#else template a(b (*)()); template a(b(__attribute__((fastcall)) *c)()); +#endif }; -- 2.47.2