public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63661] New: -O2 miscompiles on OSX 10.10 Yosemite
@ 2014-10-27 19:03 vbraun.name at gmail dot com
  2014-10-27 19:05 ` [Bug target/63661] " vbraun.name at gmail dot com
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: vbraun.name at gmail dot com @ 2014-10-27 19:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63661

            Bug ID: 63661
           Summary: -O2 miscompiles on OSX 10.10 Yosemite
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vbraun.name at gmail dot com

Created attachment 33821
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33821&action=edit
Testcase that yields wrong answer when compiled with -O2

The attached selfcontained test_mathieu.c is based on the GSL testsuite. I
tried to make it shorter but simple changes like adding printf tend to "fix"
it. Compilation fails on OSX 10.10 Yosemite when compiled with -O2:

$ gcc -O0 -o test_mathieu test_mathieu.c -lm && ./test_mathieu
loop -2.35802
loop 2
loop 2
loop 2
loop 2

$ gcc -O1 -o test_mathieu test_mathieu.c -lm && ./test_mathieu
loop -2.35802
loop 2
loop 2
loop 2
loop 2

$ gcc -O2 -o test_mathieu test_mathieu.c -lm && ./test_mathieu
loop -2.35802
loop 2.35802
loop 2.35802
loop 2.35802
loop 2.35802

Notes:
* The non-optimized values are the correct ones.
* Works on linux x86_64 with gcc 4.9.1 (Fedora 21 alpha)
* Works with Apple clang


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

end of thread, other threads:[~2014-12-03 16:03 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-27 19:03 [Bug target/63661] New: -O2 miscompiles on OSX 10.10 Yosemite vbraun.name at gmail dot com
2014-10-27 19:05 ` [Bug target/63661] " vbraun.name at gmail dot com
2014-10-27 19:18 ` vbraun.name at gmail dot com
2014-10-28  9:01 ` rguenth at gcc dot gnu.org
2014-10-28 10:46 ` vbraun.name at gmail dot com
2014-10-28 12:08 ` howarth at bromo dot med.uc.edu
2014-10-28 12:12 ` howarth at bromo dot med.uc.edu
2014-10-28 12:13 ` howarth at bromo dot med.uc.edu
2014-10-28 12:14 ` howarth at bromo dot med.uc.edu
2014-10-28 12:24 ` howarth at bromo dot med.uc.edu
2014-10-28 12:27 ` howarth at bromo dot med.uc.edu
2014-10-28 12:44 ` howarth at bromo dot med.uc.edu
2014-10-28 14:36 ` rguenth at gcc dot gnu.org
2014-10-28 14:40 ` [Bug target/63661] [4.9/5 Regression] " rguenth at gcc dot gnu.org
2014-10-29  8:01 ` jakub at gcc dot gnu.org
2014-10-29  8:20 ` jakub at gcc dot gnu.org
2014-10-30 10:37 ` jakub at gcc dot gnu.org
2014-10-30 18:27 ` vbraun.name at gmail dot com
2014-10-31 10:28 ` jamborm at gcc dot gnu.org
2014-11-03  3:02 ` mednafen at gmail dot com
2014-11-21 17:51 ` [Bug target/63661] [4.9/5 Regression] -O2 miscompiles with -mtune=nehalem or corei7 jamborm at gcc dot gnu.org
2014-11-21 21:15 ` hjl.tools at gmail dot com
2014-11-24 12:22 ` jamborm at gcc dot gnu.org
2014-11-24 13:41 ` rguenth at gcc dot gnu.org
2014-11-26 16:11 ` renlin.li at arm dot com
2014-11-28 11:02 ` renlin at gcc dot gnu.org
2014-11-28 11:19 ` renlin at gcc dot gnu.org
2014-11-28 21:22 ` vbraun.name at gmail dot com
2014-12-01 13:08 ` [Bug target/63661] [4.9 " jakub at gcc dot gnu.org
2014-12-01 18:34 ` jamborm at gcc dot gnu.org
2014-12-03 11:14 ` renlin at gcc dot gnu.org
2014-12-03 16:03 ` renlin.li at arm 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).