I've tried you case with gcc-9.4.0 and gcc-4.8.5 for 100 times, nothing happened. Maybe it's related to you gcc and tool-chains version.