| 1 |
/* PR middle-end/112668 */ |
| 2 |
/* { dg-do compile { target bitint } } */ |
| 3 |
/* { dg-options "-std=c23 -fnon-call-exceptions" } */ |
| 4 |
|
| 5 |
#if __BITINT_MAXWIDTH__ >= 156 |
| 6 |
struct T156 { _BitInt(156) a : 2; unsigned _BitInt(156) b : 135; _BitInt(156) c : 2; }; |
| 7 |
extern void foo156 (struct T156 *); |
| 8 |
|
| 9 |
unsigned _BitInt(156) |
| 10 |
bar156 (int i) |
| 11 |
{ |
| 12 |
struct T156 r156[12]; |
| 13 |
foo156 (&r156[0]); |
| 14 |
return r156[i].b; |
| 15 |
} |
| 16 |
#endif |
| 17 |
|
| 18 |
#if __BITINT_MAXWIDTH__ >= 495 |
| 19 |
struct T495 { _BitInt(495) a : 2; unsigned _BitInt(495) b : 471; _BitInt(495) c : 2; }; |
| 20 |
extern void foo495 (struct T495 *r495); |
| 21 |
|
| 22 |
unsigned _BitInt(495) |
| 23 |
bar495 (int i) |
| 24 |
{ |
| 25 |
struct T495 r495[12]; |
| 26 |
foo495 (r495); |
| 27 |
return r495[i].b; |
| 28 |
} |
| 29 |
#endif |