https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95123
--- Comment #6 from Alexander Monakov <amonakov at gcc dot gnu.org> --- Oh, you're probably configuring your compiler with --enable-default-pie. Please paste the entire gcc -v. I can reproduce the miscompile it if I pass -fpie -pie.