ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git] / gcc / testsuite / g++.dg / contracts / contracts-constexpr3.C
blob8826220ef913b0bc06e8fc7a19875d8cce7aab38
1 // An assumed contract shouldn't break constant evaluation.
3 // { dg-do compile { target c++20 } }
4 // { dg-additional-options -fcontracts }
6 bool b;
8 constexpr int f() [[ pre assume: b ]] { return 42; }
10 static_assert (f() > 0);