aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-05-07 14:56:51 +0200
committerJakub Jelinek <jakub@redhat.com>2020-05-07 14:56:51 +0200
commit1d865b29abc99122e9faf109fe8faf2d6616a073 (patch)
tree3b94d54be913195e018780ce71c8b1b299f4a118
parent9b95bb52b40c05e630278fe5cd61a79a3c4f620a (diff)
downloadgcc-1d865b29abc99122e9faf109fe8faf2d6616a073.zip
gcc-1d865b29abc99122e9faf109fe8faf2d6616a073.tar.gz
gcc-1d865b29abc99122e9faf109fe8faf2d6616a073.tar.bz2
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 <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.
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/ext/attr-parm-1.C7
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 227aa63..59faa63 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,9 @@
-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.
diff --git a/gcc/testsuite/g++.dg/ext/attr-parm-1.C b/gcc/testsuite/g++.dg/ext/attr-parm-1.C
index cc53a2c..681a652 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 <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
};