]> gcc.gnu.org Git - gcc.git/commit
Fix segfault during delay slot scheduling pass
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 9 Jan 2024 09:14:29 +0000 (10:14 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 9 Jan 2024 09:25:46 +0000 (10:25 +0100)
commit6ddc3fe23ede844454584bc3699f879d3694a382
tree5b88abab002e60e6b7a1007b4017fb8107af2c5e
parentd4905489309edfd3e838816ab2cef04d5374efb7
Fix segfault during delay slot scheduling pass

This is a small regression present on the mainline and 13 branch, although
the underlying problem has probably been there for ages, in the form of a
segfault during the delay slot scheduling pass, for a function that falls
through to exit without any instruction generated for the end of function.

gcc/
PR rtl-optimization/113140
* reorg.cc (fill_slots_from_thread): If we are to branch after the
last instruction of the function, create an end label.

gcc/testsuite/
* g++.dg/opt/delay-slot-2.C: New test.
gcc/reorg.cc
gcc/testsuite/g++.dg/opt/delay-slot-2.C [new file with mode: 0644]
This page took 0.066033 seconds and 6 git commands to generate.