https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67151
Nickolay Merkin <nickolay.merkin at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code --- Comment #1 from Nickolay Merkin <nickolay.merkin at gmail dot com> --- Yet another ICE in same location http://ideone.com/yxsgWl unsigned constexpr foo(int (*p)[1]) { return 0ULL; } int constexpr foo(void* p) { return 0; } template<int N> auto const bar = foo((int(*)[N])nullptr); template<int N> int const buz = (true ? -1 : bar<N>) / 2; int main() { // auto x = bar<1>; // uncomment to eliminate ICE auto y = buz<1>; // ICE!!! } Now, we deal with valid code. The ICE appears only if the right operand, bar<1>, has not been instantiated yet. As soon as it has been instantiated (uncommment the x), all works well. In this example I tried to show how the type of ignored operand may change the result of the operation. Compare buz<1> and buz<2>. But the ICE does not let me show that. No recursion, no obvious error. Thus, I add the keyword 'ice-on-valid-code'.