public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sje at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60604] New: GCC incorrectly compiles s_csinh function on MIPS
Date: Thu, 20 Mar 2014 17:25:00 -0000	[thread overview]
Message-ID: <bug-60604-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 60604
           Summary: GCC incorrectly compiles s_csinh function on MIPS
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sje at gcc dot gnu.org
            Target: mips*-*-*

Created attachment 32410
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32410&action=edit
Test case

While looking at a GCC fortran test failure
(gfortran.dg/complex_intrinsic_3.f90) I tracked the problem down to GCC
miscompiling the routine.  I have attached a cutdown test case to this report.

When compiled for mips32r2, big-endian, hard-float, and using -O0 or -O1
the attached program prints:

x = 0.634964 1.298458
rcls = 4, icls = 4, t = 709
In __csinh(1), 0.634964 1.29846
In __csinh(2), 0.634964 1.29846
x = 0.000000 0.000000

When compiled with -O2 or -O3 it prints:

x = 0.634964 1.298458
rcls = 4, icls = 4, t = 709
In __csinh(1), 0.634964 1.29846
In __csinh(2), 1.00959e+116 1.29846
In if statement
x = 0.000000 0.000000

Somehow the optimized code is corrupting the input value of csinh.


             reply	other threads:[~2014-03-20 17:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 17:25 sje at gcc dot gnu.org [this message]
2014-03-21 23:46 ` [Bug target/60604] " sje at gcc dot gnu.org
2014-03-21 23:54 ` sje at gcc dot gnu.org
2014-03-22  0:48 ` [Bug target/60604] GCC incorrectly compiles s_csinh function on MIPS32 (32bit fp) pinskia at gcc dot gnu.org
2014-03-24 23:10 ` sje at gcc dot gnu.org
2014-03-25 22:12 ` [Bug target/60604] [4.9 Regression] " sje at gcc dot gnu.org
2014-03-27 16:43 ` sje at gcc dot gnu.org
2014-03-27 18:42 ` sje at gcc dot gnu.org
2014-03-30 21:39 ` rsandifo at gcc dot gnu.org
2014-03-30 21:40 ` rsandifo at gcc dot gnu.org
2014-03-31  8:55 ` rguenth at gcc dot gnu.org
2014-03-31  9:48 ` rguenth at gcc dot gnu.org
2014-03-31 10:54 ` pinskia at gcc dot gnu.org
2014-03-31 11:15 ` rguenth at gcc dot gnu.org
2014-04-01 10:38 ` rsandifo at gcc dot gnu.org
2014-04-01 10:45 ` rsandifo at gcc dot gnu.org

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