blob: 97acba0fa1effd46024cad00f4b5bcaa92cd04f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* PR libgcc/114327 */
/* { dg-do run { target bitint } } */
/* { dg-options "-std=c23" } */
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */
#if __BITINT_MAXWIDTH__ >= 256
_BitInt(256)
foo (_BitInt(256) b, _BitInt(256) c)
{
return b % c;
}
_BitInt(256)
bar (_BitInt(256) b, _BitInt(256) c)
{
return b / c;
}
#endif
int
main ()
{
#if __BITINT_MAXWIDTH__ >= 256
if (foo (-0x9e9b9fe60wb, 1wb))
__builtin_abort ();
if (bar (1wb, -0x9e9b9fe60wb))
__builtin_abort ();
#endif
}
|