From: Stefan Schulze Frielinghaus Date: Thu, 26 Oct 2023 06:41:24 +0000 (+0200) Subject: testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c X-Git-Tag: basepoints/gcc-15~5201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88df58b7ee998250fee80819b638110a4a56b732;p=thirdparty%2Fgcc.git testsuite: Fix _BitInt in gcc.misc-tests/godump-1.c 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. gcc/testsuite/ChangeLog: * gcc.misc-tests/godump-1.c: Move _BitInt tests into godump-2.c. * gcc.misc-tests/godump-2.c: New test. --- diff --git a/gcc/testsuite/gcc.misc-tests/godump-1.c b/gcc/testsuite/gcc.misc-tests/godump-1.c index f359a6578279..b661d04719cc 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 000000000000..ed093c964ac9 --- /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" } } */