https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69188
--- Comment #14 from Matt Godbolt <matt at godbolt dot org> --- We confirm seeing the same issue (a large proprietary system, when building optimized tests at -O3 but linking against test libraries compiled with -O2).