]> gcc.gnu.org Git - 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, 24 Jan 2023 13:36:36 +0000 (14:36 +0100)
commita3dfcaac560f5589028fdd967bfaa60d84c265ac
treeb30d9fc5c8a0ac5e9712843fe2c8f2427ef53239
parent45cff68d063b689bd6a9f30827b1fdd3f5ea2cb4
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.

(cherry picked from commit b4fddbe9592e9feb37ce567d90af822b75995531)
gcc/testsuite/gcc.dg/torture/pr108076.c [new file with mode: 0644]
gcc/tree-if-conv.cc
This page took 0.075702 seconds and 6 git commands to generate.