We have code later on that verifies the code is a comparison. So let's
try to catch it earlier. So it is easier to debug where the incorrect code
gets set.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* gimple.h (gimple_cond_set_code): Add assert of the code
being a comparison.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
inline void
gimple_cond_set_code (gcond *gs, enum tree_code code)
{
+ gcc_gimple_checking_assert (TREE_CODE_CLASS (code) == tcc_comparison);
gs->subcode = code;
}