c++: ICE with reinterpret_cast and switch [PR113545]
Jason, this is the patch you proposed for PR113545. It looks very safe
so I'm posting it here so that it's not forgotten.
PR c++/113545
gcc/cp/ChangeLog:
* constexpr.cc (cxx_eval_switch_expr): If the condition doesn't reduce
to an INTEGER_CST, consider it non-constant.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1y/constexpr-reinterpret3.C: New test.
* g++.dg/cpp1y/constexpr-reinterpret4.C: New test.
(cherry picked from commit
39d989022dd0eacf1a7b95b7b20621acbe717d70)