| 1 |
// PR c++/118525 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
|
| 4 |
// Make sure we don't ICE |
| 5 |
consteval int id (int i) { return i; } |
| 6 |
|
| 7 |
void |
| 8 |
g (int i) |
| 9 |
{ |
| 10 |
1 ? 1 : id (i) ^ 1; // { dg-error "call to consteval function|'i' is not a constant expression" } |
| 11 |
} |