public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/64941] New: -O3 breaks tar
@ 2015-02-05  5:22 brian at soulspark dot org
  2015-02-05  5:28 ` [Bug c/64941] " brian at soulspark dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: brian at soulspark dot org @ 2015-02-05  5:22 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-15 14:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05  5:22 [Bug c/64941] New: -O3 breaks tar brian at soulspark dot org
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

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).