]> 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:46:10 +0000 (15:46 +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/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/attr-parm-1.C

index d766fd171603ae6a94c220553e0ac1c5412fa789..02b5dbc6ea80842a7d28e345f27b7ba5141d2c9d 100644 (file)
@@ -1,3 +1,10 @@
+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.  Remove dg-options.
+
 2020-05-05  Andreas Krebbel  <krebbel@linux.ibm.com>
 
        Backport from mainline
index 872b3e0a019e001e8d8eef372d801eef811cd6f1..681a652de1f4e05cd3db7c3ba67f457890f5a24e 100644 (file)
@@ -1,7 +1,11 @@
-// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
-// { dg-options -m32 }
+// { 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
 };