]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Improve g++.dg/ext/attr-parm-1.C testcase [PR94946]
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 May 2020 12:56:51 +0000 (14:56 +0200)
committerJakub Jelinek <jakub@redhat.com>
Thu, 7 May 2020 13:24:14 +0000 (15:24 +0200)
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  <jakub@redhat.com>

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
gcc/c/ChangeLog
gcc/cp/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/attr-parm-1.C

index c948d829d6ba5fbe226626b6080f72f41cfb99e9..905bd056b2dac0cc96fb7e4cf94d299fc086836c 100644 (file)
@@ -1,21 +1,22 @@
-2020-05-06  Jakub Jelinek  <jakub@redhat.com>
+2020-05-07  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2020-05-06  Jakub Jelinek  <jakub@redhat.com>
 
        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  <jakub@redhat.com>
-
        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  <jakub@redhat.com>
+       2020-05-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/94942
        * config/i386/mmx.md (*vec_dupv4hi): Use xYw constraints instead of Yv.
 
-2020-05-04  Jakub Jelinek  <jakub@redhat.com>
+       2020-05-04  Jakub Jelinek  <jakub@redhat.com>
 
        * opts.c (get_option_html_page): Instead of hardcoding a list of
        options common between C/C++ and Fortran only use gfortran/
index c7dbd7d54230b236cd396290c454e745beac4227..7fb870148da2cd4e545876a4aeb1945ad0ca7876 100644 (file)
@@ -1,4 +1,7 @@
-2020-04-30  Jakub Jelinek  <jakub@redhat.com>
+2020-05-07  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2020-04-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/94842
        * c-decl.c (set_labels_context_r): In addition to context-less
index c374c2b7644d7f37c87ccbab4f0df6e4309875f0..b5201634053c3385557b83925ce50cc02fbf2ef2 100644 (file)
@@ -1,12 +1,13 @@
-2020-05-06  Jakub Jelinek  <jakub@redhat.com>
+2020-05-07  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2020-05-06  Jakub Jelinek  <jakub@redhat.com>
 
        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  <jakub@redhat.com>
-
        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.
index fb3658c62a786d4100972c6dcabe11428f4e8e52..4ae9129a796729e46ae0b4e451a20e02fee897ee 100644 (file)
@@ -1,29 +1,31 @@
-202-05-07  Jakub Jelinek  <jakub@redhat.com>
+2020-05-07  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <jakub@redhat.com>
+       Backported from mainline
+       2020-05-06  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/94951
        * g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test.
 
-2020-05-06  Jakub Jelinek  <jakub@redhat.com>
-
        PR c++/94907
        * g++.dg/cpp2a/spaceship-synth8.C: New test.
 
-2020-05-06  Jakub Jelinek  <jakub@redhat.com>
-
        PR rtl-optimization/94873
        * gcc.dg/pr94873.c: New test.
 
-2020-05-05  Jakub Jelinek  <jakub@redhat.com>
+       2020-05-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/94942
        * gcc.target/i386/pr94942.c: New test.
 
-2020-04-30  Jakub Jelinek  <jakub@redhat.com>
+       2020-04-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/94842
        * gcc.dg/pr94842.c: New test.
index cc53a2ce328b964fb8d0de38a7207b56ae4a1244..681a652de1f4e05cd3db7c3ba67f457890f5a24e 100644 (file)
@@ -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 <typename b> a(b(__attribute__((sysv_abi)) *c)());
+  template <typename b> a(b(__attribute__((ms_abi)) *c)());
+#else
   template <typename b> a(b (*)());
   template <typename b> a(b(__attribute__((fastcall)) *c)());
+#endif
 };