Hi! On Wed, May 06, 2020 at 02:14:03PM -0400, Nathan Sidwell wrote: > --- /dev/null > +++ w/gcc/testsuite/g++.dg/ext/attr-parm-1.C > @@ -0,0 +1,7 @@ > +// { dg-do compile { target { i?86-*-* x86_64-*-* } } } > +// { dg-options -m32 } > +// PR 94946 > +class a { > + template <typename b> a(b (*)()); > + template <typename b> a(b(__attribute__((fastcall)) *c)()); > +};
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. Ok for trunk/10.2? And for 9.4 with additional removal of the forgotten dg-options -m32 line? Regtested on x86_64-linux and i686-linux. 2020-05-06 Jakub Jelinek <ja...@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/g++.dg/ext/attr-parm-1.C.jj 2020-05-06 22:48:46.215419942 +0200 +++ gcc/testsuite/g++.dg/ext/attr-parm-1.C 2020-05-06 22:50:40.117727005 +0200 @@ -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 }; Jakub