* [PATCH] testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c
@ 2023-10-24 15:26 Stefan Schulze Frielinghaus
2023-10-24 18:03 ` Jeff Law
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Schulze Frielinghaus @ 2023-10-24 15:26 UTC (permalink / raw)
To: gcc-patches, iant; +Cc: Stefan Schulze Frielinghaus
Currently _BitInt is only supported on x86_64 which means that for other
targets all tests fail with e.g.
gcc.misc-tests/godump-1.c:237:1: sorry, unimplemented: '_BitInt(32)' is not supported on this target
237 | _BitInt(32) b32_v;
| ^~~~~~~
Instead of requiring _BitInt support for godump-1.c, move _BitInt tests
into godump-2.c such that all other tests in godump-1.c are still
executed in case of missing _BitInt support.
Tested on s390x and x86_64. Ok for mainline?
gcc/testsuite/ChangeLog:
* gcc.misc-tests/godump-1.c: Move _BitInt tests into godump-2.c.
* gcc.misc-tests/godump-2.c: New test.
---
gcc/testsuite/gcc.misc-tests/godump-1.c | 12 ------------
gcc/testsuite/gcc.misc-tests/godump-2.c | 18 ++++++++++++++++++
2 files changed, 18 insertions(+), 12 deletions(-)
create mode 100644 gcc/testsuite/gcc.misc-tests/godump-2.c
diff --git a/gcc/testsuite/gcc.misc-tests/godump-1.c b/gcc/testsuite/gcc.misc-tests/godump-1.c
index f359a657827..b661d04719c 100644
--- a/gcc/testsuite/gcc.misc-tests/godump-1.c
+++ b/gcc/testsuite/gcc.misc-tests/godump-1.c
@@ -234,18 +234,6 @@ const char cc_v1;
cc_t cc_v2;
/* { dg-final { scan-file godump-1.out "(?n)^var _cc_v2 _cc_t$" } } */
-_BitInt(32) b32_v;
-/* { dg-final { scan-file godump-1.out "(?n)^var _b32_v int32$" } } */
-
-_BitInt(64) b64_v;
-/* { dg-final { scan-file godump-1.out "(?n)^var _b64_v int64$" } } */
-
-unsigned _BitInt(32) b32u_v;
-/* { dg-final { scan-file godump-1.out "(?n)^var _b32u_v uint32$" } } */
-
-_BitInt(33) b33_v;
-/* { dg-final { scan-file godump-1.out "(?n)^// var _b33_v INVALID-bitint-33$" } } */
-
/*** pointer and array types ***/
typedef void *vp_t;
/* { dg-final { scan-file godump-1.out "(?n)^type _vp_t \\*byte$" } } */
diff --git a/gcc/testsuite/gcc.misc-tests/godump-2.c b/gcc/testsuite/gcc.misc-tests/godump-2.c
new file mode 100644
index 00000000000..ed093c964ac
--- /dev/null
+++ b/gcc/testsuite/gcc.misc-tests/godump-2.c
@@ -0,0 +1,18 @@
+/* { dg-options "-c -fdump-go-spec=godump-2.out" } */
+/* { dg-do compile { target bitint } } */
+/* { dg-skip-if "not supported for target" { ! "alpha*-*-* s390*-*-* i?86-*-* x86_64-*-*" } } */
+/* { dg-skip-if "not supported for target" { ! lp64 } } */
+
+_BitInt(32) b32_v;
+/* { dg-final { scan-file godump-2.out "(?n)^var _b32_v int32$" } } */
+
+_BitInt(64) b64_v;
+/* { dg-final { scan-file godump-2.out "(?n)^var _b64_v int64$" } } */
+
+unsigned _BitInt(32) b32u_v;
+/* { dg-final { scan-file godump-2.out "(?n)^var _b32u_v uint32$" } } */
+
+_BitInt(33) b33_v;
+/* { dg-final { scan-file godump-2.out "(?n)^// var _b33_v INVALID-bitint-33$" } } */
+
+/* { dg-final { remove-build-file "godump-2.out" } } */
--
2.41.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c
2023-10-24 15:26 [PATCH] testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c Stefan Schulze Frielinghaus
@ 2023-10-24 18:03 ` Jeff Law
2023-10-25 17:31 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2023-10-24 18:03 UTC (permalink / raw)
To: Stefan Schulze Frielinghaus, gcc-patches, iant
On 10/24/23 09:26, Stefan Schulze Frielinghaus wrote:
> Currently _BitInt is only supported on x86_64 which means that for other
> targets all tests fail with e.g.
>
> gcc.misc-tests/godump-1.c:237:1: sorry, unimplemented: '_BitInt(32)' is not supported on this target
> 237 | _BitInt(32) b32_v;
> | ^~~~~~~
>
> Instead of requiring _BitInt support for godump-1.c, move _BitInt tests
> into godump-2.c such that all other tests in godump-1.c are still
> executed in case of missing _BitInt support.
>
> Tested on s390x and x86_64. Ok for mainline?
>
> gcc/testsuite/ChangeLog:
>
> * gcc.misc-tests/godump-1.c: Move _BitInt tests into godump-2.c.
> * gcc.misc-tests/godump-2.c: New test.
OK
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c
2023-10-24 18:03 ` Jeff Law
@ 2023-10-25 17:31 ` Ian Lance Taylor
0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2023-10-25 17:31 UTC (permalink / raw)
To: Jeff Law; +Cc: Stefan Schulze Frielinghaus, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 881 bytes --]
On Tue, Oct 24, 2023, 11:03 AM Jeff Law <jeffreyalaw@gmail.com> wrote:
>
>
> On 10/24/23 09:26, Stefan Schulze Frielinghaus wrote:
> > Currently _BitInt is only supported on x86_64 which means that for other
> > targets all tests fail with e.g.
> >
> > gcc.misc-tests/godump-1.c:237:1: sorry, unimplemented: '_BitInt(32)' is
> not supported on this target
> > 237 | _BitInt(32) b32_v;
> > | ^~~~~~~
> >
> > Instead of requiring _BitInt support for godump-1.c, move _BitInt tests
> > into godump-2.c such that all other tests in godump-1.c are still
> > executed in case of missing _BitInt support.
> >
> > Tested on s390x and x86_64. Ok for mainline?
> >
> > gcc/testsuite/ChangeLog:
> >
> > * gcc.misc-tests/godump-1.c: Move _BitInt tests into godump-2.c.
> > * gcc.misc-tests/godump-2.c: New test.
> OK
>
Thanks.
Ian
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-25 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24 15:26 [PATCH] testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c Stefan Schulze Frielinghaus
2023-10-24 18:03 ` Jeff Law
2023-10-25 17:31 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).