Message ID | 20231024152655.1618696-1-stefansf@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c | expand |
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
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 >
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" } } */