]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimple: Add assert for code being a comparison in gimple_cond_set_code
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 13 May 2025 20:50:24 +0000 (13:50 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 14 May 2025 14:56:22 +0000 (07:56 -0700)
commit9a770e52028c010f31d86d0fed3635916f5852fd
tree7b7b560c7dfec7ece6459490cea986df21d886cd
parentd8d3cb676949ea3c2af5ff2d4f6c5582ce7cc9f8
gimple: Add assert for code being a comparison in gimple_cond_set_code

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>
gcc/gimple.h