public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56204] [4.8 regression] gfortran.dg/quad_[23].f90 FAIL on Solaris 9/x86
Date: Wed, 13 Feb 2013 11:20:00 -0000	[thread overview]
Message-ID: <bug-56204-4-95naIstxMd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-56204-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2013-02-13 11:19:37 UTC ---
> --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-02-12 19:27:16 UTC ---
> (In reply to comment #0)
>> The test is l.34:
>> 
>> 34         if (fp2 /= fp4) call abort()
>> but unfortunately gdb 7.5 can read neither variable.
>
> Can you uncomment the existing "print" lines and add
>   print *, fp2
>   print *, fp4
> before the abort line?

Sure, this way I get

>   1.00000000000000000000000000000000000<
>1.00000000000000000000000000000000000<
>   1.41421356237309504880168872420969798<
>1.41421356237309504880168872420969798<
   1.41421356237309504880168872420969798      
   1.41421356237309504880168872420969779      

> Probably, some rounding goes wrong - maybe replacing
>   if (fp2 /= fp4) call abort()
> by
>   if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
> works which allows for a minor deviation of the value.

This helps, but now we run into the next abort.  Adding another set of
print's shows

   1.41421356237309504880168872420969798      
   1.41421356237309504880168872420969779      

Changing the abort() conditions both times allows the test to pass, also
tested with the prints commented again and the appropriate runtest
invocation on i386-pc-solaris2.9, i386-pc-solaris2.10, and
x86_64-unknown-linux-gnu.

The quad_3.f90 test aborts here:

#5  0x080511b1 in test_qp ()
    at /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/quad_3.f90:28
28           if (a-b(1) /= 0.0_qp .or. c-b(1) /= 0.0_qp) call abort()

Uncommenting the prints shows:

 same value read again:      1.18973149535723176508575932662800647E+0932  
1.18973149535723176508575932662800647E+0932
 difference: looks OK now   -1.87718493982104061421441469311027910E+0898

    Rainer


  parent reply	other threads:[~2013-02-13 11:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 13:32 [Bug fortran/56204] New: " ro at gcc dot gnu.org
2013-02-08 15:47 ` [Bug fortran/56204] " rguenth at gcc dot gnu.org
2013-02-12 19:27 ` burnus at gcc dot gnu.org
2013-02-13 11:20 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message]
2013-02-13 12:04 ` burnus at gcc dot gnu.org
2013-02-13 12:06 ` burnus at gcc dot gnu.org
2013-02-14 10:13 ` ro at CeBiTec dot Uni-Bielefeld.DE

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-56204-4-95naIstxMd@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).