https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77620
--- Comment #2 from petschy at gmail dot com --- Thanks, --enable-checking=release did the trick. Those unreleased checks definitely have some runtime cost :) My project was built in 3m35 with -O3, and the gcc master branch: 7.0.0 -O0 7m30 -O1 7m00 -O2 8m23 -O3 9m02 These are effectively the same as with 6.2.1. Sorry for the noise.