On 7/20/24 12:00, Jakub Jelinek wrote:
On Sat, Jul 20, 2024 at 11:48:36AM -0400, Andrew MacLeod wrote:
On 7/20/24 01:58, Sam James wrote:
FAIL: gcc.dg/pr116003.c (test for excess errors)
Excess errors:
/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/pr116003.c:4:1:
 sorry, unimplemented: '_BitInt(5)' is not supported on this target
/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/pr116003.c:8:1:
 sorry, unimplemented: '_BitInt(129)' is not supported on this target
/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/pr116003.c:11:5:
 sorry, unimplemented: '_BitInt(128)' is not supported on this target

I think it needs dg-do compile { target bitint }.

Indeed, thanks.  Pushed.
This isn't enough.
The bitint effective target just means that the target supports
at least some _BitInt precisions (the standard in that case mandates
support for at least bits in long long, so 64), but this testcase
uses _BitInt(129), for that one needs to check for
#if __BITINT_MAXWIDTH__ >= 129
or use e.g. bitint575 effective target which guarantees _BitInt(575)
support.

        Jakub

ugg.  Maybe wrap the entire body like so?

diff --git a/gcc/testsuite/gcc.dg/pr116003.c b/gcc/testsuite/gcc.dg/pr116003.c
index 970b1539c48..741baff52a7 100644
--- a/gcc/testsuite/gcc.dg/pr116003.c
+++ b/gcc/testsuite/gcc.dg/pr116003.c
@@ -1,6 +1,7 @@
 /* { dg-do compile { target bitint } } */
 /* { dg-options "-O2 -fnon-call-exceptions -fprofile-arcs -finstrument-functions -fno-tree-copy-prop" } */

+#if __BITINT_MAXWIDTH__ >= 129
 _BitInt(5) b5;

 char c;
@@ -19,3 +20,4 @@ l64:
   if (__builtin_sub_overflow(c, 0, &b5))
     goto l64;
 }
+#endif



Reply via email to