]> git.ipfire.org Git - thirdparty/gcc.git/commit
gimple-verifier: Add check that comparison in GIMPLE_COND does not throw
authorAndrew Pinski <quic_apinski@quicinc.com>
Thu, 24 Apr 2025 16:45:16 +0000 (09:45 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Mon, 28 Apr 2025 17:16:54 +0000 (10:16 -0700)
commit4c40e3d7b9152f40e5a3d35060b6822ddc743624
tree0950546148edaa59a926dfbc223b9c8ad7892f52
parentbfc3154375710a37969b2002dc87219dc2102a13
gimple-verifier: Add check that comparison in GIMPLE_COND does not throw

While working on PR 119903, I noticed that there is code in replace_stmt_with_simplification
which makes sure that the comparison of a GIMPLE_COND does not throw
(non-call exceptions and trapping math) but the gimple verifier does not
verify this. So let's add it.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-cfg.cc (verify_gimple_cond): Error out if the comparison
throws.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/tree-cfg.cc