https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119796
--- Comment #2 from AlphaOmegaProgrammer <alpha.and.omega.programmer at gmail dot com> --- Created attachment 61109 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61109&action=edit Proposed Patch This is my proposed patch. I've tested it and my test case no longer deadlocks, and none of my previous tests that did not deadlock seem to be affected. I haven't read through all of the contributing rules though and I don't have the time or knowledge to test this thoroughly, but I don't expect a relatively simple change like this should have any unknown impacts.