| 1 |
/* Test that the compiler does not crash when void expressions are |
| 2 |
found inside conditional expressions. PR c/43082. */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
|
| 5 |
void |
| 6 |
foo (int x) |
| 7 |
{ |
| 8 |
if (x ? (void)(0) : (void)(1)) /* { dg-error "void value not ignored as it ought to be" } */ |
| 9 |
; |
| 10 |
} |