| 1 |
/* Test that we don't lose side-effects when converting from nullptr_t. */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-std=c23 -pedantic-errors" } */ |
| 4 |
|
| 5 |
int i; |
| 6 |
typeof (nullptr) fn () { ++i; return nullptr; } |
| 7 |
|
| 8 |
int |
| 9 |
main () |
| 10 |
{ |
| 11 |
int *p = fn (); |
| 12 |
if (i != 1) |
| 13 |
__builtin_abort (); |
| 14 |
} |