| 1 |
// PR c++/94937 - ICE with -Wall and constexpr if. |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
// { dg-options "-Wall" } |
| 4 |
|
| 5 |
struct B { |
| 6 |
static constexpr bool foo() { return false; } |
| 7 |
}; |
| 8 |
|
| 9 |
template<typename T> |
| 10 |
struct C { |
| 11 |
static void bar () |
| 12 |
{ |
| 13 |
if constexpr (B::foo()) ; |
| 14 |
} |
| 15 |
}; |