public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "brian at soulspark dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/64941] New: -O3 breaks tar
Date: Thu, 05 Feb 2015 05:22:00 -0000	[thread overview]
Message-ID: <bug-64941-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2015-02-05  5:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05  5:22 brian at soulspark dot org [this message]
2015-02-05  5:28 ` [Bug c/64941] " brian at soulspark dot org
2015-02-05  5:37 ` [Bug target/64941] " pinskia at gcc dot gnu.org
2015-02-05 12:40 ` jakub at gcc dot gnu.org
2015-02-09  1:55 ` brian at soulspark dot org
2015-02-14 18:16 ` mikpelinux at gmail dot com
2015-02-14 19:58 ` brian at soulspark dot org
2015-02-15  1:21 ` hjl.tools at gmail dot com
2015-02-15  4:16 ` hjl.tools at gmail dot com
2015-02-15 14:06 ` hjl.tools at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64941-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).