]> gcc.gnu.org Git - gcc.git/commitdiff
Fix division by zero in loop splitting
authorJan Hubicka <jh@suse.cz>
Thu, 10 Aug 2023 22:23:14 +0000 (00:23 +0200)
committerJan Hubicka <jh@suse.cz>
Thu, 10 Aug 2023 22:23:14 +0000 (00:23 +0200)
Profile update I added to tree-ssa-loop-split can divide by zero in
situation that the conditional is predicted with 0 probability which
is triggered by jump threading update in the testcase.

gcc/ChangeLog:

PR middle-end/110923
* tree-ssa-loop-split.cc (split_loop): Watch for division by zero.

gcc/testsuite/ChangeLog:

PR middle-end/110923
* gcc.dg/tree-ssa/pr110923.c: New test.


No differences found
This page took 2.508692 seconds and 5 git commands to generate.