From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20853 invoked by alias); 5 Feb 2015 05:22:55 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20844 invoked by uid 48); 5 Feb 2015 05:22:52 -0000 From: "brian at soulspark dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/64941] New: -O3 breaks tar Date: Thu, 05 Feb 2015 05:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: brian at soulspark dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00414.txt.bz2 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.