https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108322
--- Comment #1 from David Korth <gerbilsoft at gerbilsoft dot com> --- Some quick testing with Compiler Explorer at godbolt.org shows that this behavior started with gcc-8.1, and it doesn't happen with gcc-7.x or earlier.