]> git.ipfire.org Git - people/ms/gcc.git/commit
tree-optimization/108076 - if-conversion and forced labels
authorRichard Biener <rguenther@suse.de>
Mon, 12 Dec 2022 16:52:46 +0000 (17:52 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 13 Dec 2022 10:39:59 +0000 (11:39 +0100)
commitb4fddbe9592e9feb37ce567d90af822b75995531
tree5cbc84750383eabbde9eb34c8255518c28ff865f
parent0a43f7b1a73c8e3b9cefffe430274d0a3d6d3291
tree-optimization/108076 - if-conversion and forced labels

When doing if-conversion we simply throw away labels without checking
whether they are possibly targets of non-local gotos or have their
address taken.  The following rectifies this and refuses to if-convert
such loops.

PR tree-optimization/108076
* tree-if-conv.cc (if_convertible_loop_p_1): Reject blocks
with non-local or forced labels that we later remove
labels from.

* gcc.dg/torture/pr108076.c: New testcase.
gcc/testsuite/gcc.dg/torture/pr108076.c [new file with mode: 0644]
gcc/tree-if-conv.cc