https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82302
Bug ID: 82302 Summary: LTO producing bad code Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: krzysio.kurek at wp dot pl CC: marxin at gcc dot gnu.org Target Milestone: --- I've found a repository with code which upon compilation with -flto under GCC7 creates a softlock. Works fine on GCC6. Here's a fork of the repo: https://github.com/kiroma/MineCraft-One-Week-Challenge It's made so that cmake defaults to a build configuration with -flto enabled. On GCC6 the program will output to the console: Attempting to load chunk Finished loading chunk, all clear! Spawn found! Attempts: x Time Taken: y seconds On GCC7 it will print: Attempting to load chunk but will not proceed.