[COMMITTED] Tweak pr116003.c to target bitint.
Checks
Commit Message
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.
Andrew
commit 320c0d49dd5d7d96443b8ee2fde3cce533eaa761
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Sat Jul 20 11:45:16 2024 -0400
Add bitint to options for testcase
Testcase should only be for bitint targets
gcc/testsuite/
* gcc.dg/pr116003.c : Add target bitint.
Comments
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
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
On Sat, Jul 20, 2024 at 12:31:34PM -0400, Andrew MacLeod wrote:
>
> 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?
Yes. Though, perantically empty translation unit is invalid, so you could
do something like
#else
int
main ()
{
}
before the
#endif
Jakub
On 7/20/24 12:54, Jakub Jelinek wrote:
>>>
>>> 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?
> Yes. Though, perantically empty translation unit is invalid, so you could
> do something like
> #else
> int
> main ()
> {
> }
> before the
> #endif
>
> Jakub
>
perhaps easier to just do
diff --git a/gcc/testsuite/gcc.dg/pr116003.c
b/gcc/testsuite/gcc.dg/pr116003.c
index 970b1539c48..44e625015b0 100644
--- a/gcc/testsuite/gcc.dg/pr116003.c
+++ b/gcc/testsuite/gcc.dg/pr116003.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target bitint } } */
+/* { dg-do compile { target bitint575 } } */
/* { dg-options "-O2 -fnon-call-exceptions -fprofile-arcs
-finstrument-functions -fno-tree-copy-prop" } */
_BitInt(5) b5;
On Sat, Jul 20, 2024 at 12:57:39PM -0400, Andrew MacLeod wrote:
> perhaps easier to just do
That works as well, sure.
> diff --git a/gcc/testsuite/gcc.dg/pr116003.c
> b/gcc/testsuite/gcc.dg/pr116003.c
> index 970b1539c48..44e625015b0 100644
> --- a/gcc/testsuite/gcc.dg/pr116003.c
> +++ b/gcc/testsuite/gcc.dg/pr116003.c
> @@ -1,4 +1,4 @@
> -/* { dg-do compile { target bitint } } */
> +/* { dg-do compile { target bitint575 } } */
> /* { dg-options "-O2 -fnon-call-exceptions -fprofile-arcs
> -finstrument-functions -fno-tree-copy-prop" } */
>
> _BitInt(5) b5;
Jakub
On 7/20/24 14:54, Jakub Jelinek wrote:
> On Sat, Jul 20, 2024 at 12:57:39PM -0400, Andrew MacLeod wrote:
>> perhaps easier to just do
> That works as well, sure.
>
Committed.
Andrew
commit 15571d2d54c705f22aced5e972cb463d0593aa3c
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Sat Jul 20 12:49:39 2024 -0400
Require bitint575 for pr116003.c
Require a bitint target large enough.
gcc/testsuite/
* gcc.dg/pr116003.c: Require bitint575 target.
diff --git a/gcc/testsuite/gcc.dg/pr116003.c b/gcc/testsuite/gcc.dg/pr116003.c
index 970b1539c48..44e625015b0 100644
--- a/gcc/testsuite/gcc.dg/pr116003.c
+++ b/gcc/testsuite/gcc.dg/pr116003.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target bitint } } */
+/* { dg-do compile { target bitint575 } } */
/* { dg-options "-O2 -fnon-call-exceptions -fprofile-arcs -finstrument-functions -fno-tree-copy-prop" } */
_BitInt(5) b5;
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target bitint } } */
/* { dg-options "-O2 -fnon-call-exceptions -fprofile-arcs -finstrument-functions -fno-tree-copy-prop" } */
_BitInt(5) b5;