https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117997
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 60093 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60093&action=edit crc3.c So far not really reduced testcase. gcc -c -O2 -fPIE -o crc1.{o,i}; gcc -c -O2 -fPIE -o crc2.{o,i}; gcc -o crc crc1.o crc2.o crc3.c; ./crc +++ libFLAC unit test: crc testing FLAC__crc8 ... FAILED, FLAC__crc8 result did not match reference CRC for 3 bytes of test data Even gcc -c -O0 -o crc1.{o,i}; gcc -c -O2 -fPIE -o crc2.{o,i}; gcc -o crc crc1.o crc2.o crc3.c; ./crc fails, but gcc -c -O0 -o crc1.{o,i}; gcc -c -O2 -fPIE -o crc2.{o,i} -fno-optimize-crc; gcc -o crc crc1.o crc2.o crc3.c; ./crc works.