public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/56579] New: 4.8.0-20130303 g++ optimisation flags cause segfault or different program output
@ 2013-03-09 15:55 dacrick at gmail dot com
  2013-03-09 16:13 ` [Bug other/56579] " dacrick at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dacrick at gmail dot com @ 2013-03-09 15:55 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56579

             Bug #: 56579
           Summary: 4.8.0-20130303 g++ optimisation flags cause segfault
                    or different program output
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dacrick@gmail.com


Created attachment 29627
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29627
preprocessed version of paq8kx compression program source code

[My first GCC bug report so please kindly point out what
further information you may need.  I have tried to adhere
to the instructions at http://gcc.gnu.org/bugs/  Thanks.]

output of g++ -v:

Using built-in specs.
COLLECT_GCC=/usr/local/gcc-4.8-20130303/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.8-20130303/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local/gcc-4.8-20130303
Thread model: posix
gcc version 4.8.0 20130303 (experimental) (GCC)


Running the compiled program ("./paq8kx somefile") when
compiled with -O3 or -Ofast results in a segfault.

Running when compiled with -O2 no longer segfaults but
produces different program output than expected.

-O1 segfaults

-O0 and Og run and create expected output.

(Note that the above -Ox behaviour is independent of
other compiler flags (including but not limited to -flto),
and can be achieved merely by using -Ox as the sole
differentiator.)


This compares to GCC 4.7.2 and my distro provided
4.4.6, which both produce binaries that do not segfault
at all and also generate identical program output
irrespective of -O option chosen at compile time.
Running the program author's pre-compiled binary
likewise matches 4.7.2 and 4.4.6 behaviour and output.


This is the only program that I've compiled using GCC
4.8 that does not run as expected; all others run fine.

It therefore appears that 4.8.0's optimizer is being
tripped up by something in paq8kx.


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

end of thread, other threads:[~2013-03-09 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-09 15:55 [Bug other/56579] New: 4.8.0-20130303 g++ optimisation flags cause segfault or different program output dacrick at gmail dot com
2013-03-09 16:13 ` [Bug other/56579] " dacrick at gmail dot com
2013-03-09 16:22 ` markus at trippelsdorf dot de
2013-03-09 16:49 ` dacrick at gmail dot com
2013-03-09 16:52 ` markus at trippelsdorf dot de
2013-03-09 16:55 ` dacrick 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).