https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64941
Bug ID: 64941 Summary: -O3 breaks tar Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: major Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: brian at soulspark dot org While emerging my gentoo I ended up with a version of tar-1.27.1 that wouldn't extract one particular package: sys-apps/kbd-1.15.5 (although it worked on other packages) The compiled executable produced an error message when attempting to decompress and untar the file: tar xf /usr/portage/distfiles/kbd-1.15.5.tar.gz tar: Skipping to next header tar: Exiting with failure status due to previous errors After a bit of trial and error I found if I changed the CFLAGS from: 1) CFLAGS = "-fomit-frame-pointer -pipe -march=native -mtune=native -fexcess-precision=fast -O3" to: 2) CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer -fexcess-precision=fast" then the code would work as designed. This is a 64 bit system with abi_32 enabled, but I don't think that makes any difference in this case. Steps to reproduce: using gcc 4.8.3 compile the attached tar, the run the executable to extract the attached kbd. It will fail with the error message above. Change to -O2 and it will work fine.