aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/consteval38.C
blob: cc9f7ba8c820d049d84f27f15e60a1ea459fa27c (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/118525
// { dg-do compile { target c++20 } }

// Make sure we don't ICE
consteval int id (int i) { return i; }

void
g (int i)
{
    1 ? 1 : id (i) ^ 1; // { dg-error "call to consteval function|'i' is not a constant expression" }
}