public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
@ 2015-09-08 22:47 schwab@linux-m68k.org
  2015-09-10 21:11 ` [Bug fortran/67509] " fxcoudert at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2015-09-08 22:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67509
           Summary: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0
                     execution test
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: schwab@linux-m68k.org
                CC: fxcoudert at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc*-*-*

$ gcc/gfortran -Bgcc/ -Bpowerpc64-suse-linux/32/libgfortran/
../gcc/testsuite/gfortran.dg/ieee/ieee_7.f90 -O0 -pedantic-errors
-fintrinsic-modules-path $PWD/powerpc64-suse-linux/./libgfortran/
-fno-unsafe-math-optimizations -frounding-math -fsignaling-nans
-Bpowerpc64-suse-linux/./libgfortran/.libs
-Lpowerpc64-suse-linux/./libgfortran/.libs
-Lpowerpc64-suse-linux/./libgfortran/.libs
-Lpowerpc64-suse-linux/./libatomic/.libs -lm -m64 -o ./ieee_7.exe -g
$
LD_LIBRARY_PATH=.:powerpc64-suse-linux/./libgfortran/.libs:powerpc64-suse-linux/./libgfortran/.libs:gcc
./ieee_7.exe 

Program aborted. Backtrace:
#0  0x3FFFB2FF3D93
Aborted

Breakpoint 1, MAIN__ () at ../gcc/testsuite/gfortran.dg/ieee/ieee_7.f90:37
37        if (ieee_selected_real_kind(0,range(0._maxreal)+1) /= -2) call abort
(gdb) s
ieee_arithmetic::ieee_selected_real_kind (p=0, r=292, 
    radix=<error reading variable: Cannot access memory at address 0x0>)
    at ../../../libgfortran/ieee/ieee_arithmetic.F90:790
790         res = SELECTED_REAL_KIND (P, R, RADIX)
(gdb) fin
Run till exit from #0  ieee_arithmetic::ieee_selected_real_kind (p=0, r=292, 
    radix=<error reading variable: Cannot access memory at address 0x0>)
    at ../../../libgfortran/ieee/ieee_arithmetic.F90:790
0x0000000010000c7c in MAIN__ ()
    at ../gcc/testsuite/gfortran.dg/ieee/ieee_7.f90:37
37        if (ieee_selected_real_kind(0,range(0._maxreal)+1) /= -2) call abort
Value returned is $1 = 8


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
@ 2015-09-10 21:11 ` fxcoudert at gcc dot gnu.org
  2015-09-10 21:27 ` pthaugen at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-09-10 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Thanks Andreas for reporting this. Could you please compile and run the
following Fortran source, and paste the output here? It's been a long time
since I have used a ppc machine (and it was a darwin one, so maybe different
support).

$ cat z.f90 
  use iso_fortran_env
  use ieee_arithmetic
  integer, parameter :: maxreal = real_kinds(size(real_kinds))
  print *, real_kinds
  print *, maxval(real_kinds), maxreal
  print *, range(0._maxreal)
  print *, selected_real_kind(0,range(0._maxreal))
  print *, ieee_selected_real_kind(0,range(0._maxreal))
  print *, selected_real_kind(0,range(0._maxreal)+1)
  print *, ieee_selected_real_kind(0,range(0._maxreal)+1)
  end
$ ./bin/gfortran z.f90 && ./a.out


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
  2015-09-10 21:11 ` [Bug fortran/67509] " fxcoudert at gcc dot gnu.org
@ 2015-09-10 21:27 ` pthaugen at gcc dot gnu.org
  2015-09-10 21:39 ` fxcoudert at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pthaugen at gcc dot gnu.org @ 2015-09-10 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #1)
> Thanks Andreas for reporting this. Could you please compile and run the
> following Fortran source, and paste the output here? It's been a long time
> since I have used a ppc machine (and it was a darwin one, so maybe different
> support).
> 
> $ cat z.f90 
>   use iso_fortran_env
>   use ieee_arithmetic
>   integer, parameter :: maxreal = real_kinds(size(real_kinds))
>   print *, real_kinds
>   print *, maxval(real_kinds), maxreal
>   print *, range(0._maxreal)
>   print *, selected_real_kind(0,range(0._maxreal))
>   print *, ieee_selected_real_kind(0,range(0._maxreal))
>   print *, selected_real_kind(0,range(0._maxreal)+1)
>   print *, ieee_selected_real_kind(0,range(0._maxreal)+1)
>   end
> $ ./bin/gfortran z.f90 && ./a.out

I see the same thing on both powerpc64/powerpc64le:

pthaugen@genoa:~$ ~/install/gcc/trunk/bin/gfortran z.f90 && ./a.out
           4           8          16
          16          16
         291
           8
           8
           8
           8


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
  2015-09-10 21:11 ` [Bug fortran/67509] " fxcoudert at gcc dot gnu.org
  2015-09-10 21:27 ` pthaugen at gcc dot gnu.org
@ 2015-09-10 21:39 ` fxcoudert at gcc dot gnu.org
  2015-09-10 21:57 ` schwab@linux-m68k.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-09-10 21:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Pat Haugen from comment #2)
> I see the same thing on both powerpc64/powerpc64le:
> 
> pthaugen@genoa:~$ ~/install/gcc/trunk/bin/gfortran z.f90 && ./a.out
>            4           8          16
>           16          16
>          291
>            8
>            8
>            8
>            8

That's weird, because it would mean that the "decimal exponent range" (i.e. the
largest possible power of ten) is 291, which is smaller than the range of 307
for a regular double. I know that ppc long double is the non-IEEE "double
double" format, but this should give it the same range as double.

Can you tell me what this outputs?

  print *, range(0._4), range(0._8), range(0._16)
  print *, huge(0._4), huge(0._8), huge(0._16)
  print *, tiny(0._4), tiny(0._8), tiny(0._16)
  end


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
                   ` (2 preceding siblings ...)
  2015-09-10 21:39 ` fxcoudert at gcc dot gnu.org
@ 2015-09-10 21:57 ` schwab@linux-m68k.org
  2015-09-10 22:11 ` fxcoudert at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2015-09-10 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
          37         307         291
   3.40282347E+38   1.7976931348623157E+308  
8.98846567431157953864652595394512367E+0307
   1.17549435E-38   2.2250738585072014E-308  
2.00416836000897277799610805135016205E-0292


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
                   ` (3 preceding siblings ...)
  2015-09-10 21:57 ` schwab@linux-m68k.org
@ 2015-09-10 22:11 ` fxcoudert at gcc dot gnu.org
  2015-09-11 13:18 ` schwab@linux-m68k.org
  2015-09-14 11:12 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2015-09-10 22:11 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-10
     Ever confirmed|0                           |1

--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #4)
>           37         307         291
>    3.40282347E+38   1.7976931348623157E+308  
> 8.98846567431157953864652595394512367E+0307
>    1.17549435E-38   2.2250738585072014E-308  
> 2.00416836000897277799610805135016205E-0292

LDBL_MIN is smaller than DBL_MIN? I hadn't considered that…

Well, since the test's intent is to find impossible ranges, this can easily be
changed. Can you test that the patch below makes it pass for you?

Index: ieee_7.f90
===================================================================
--- ieee_7.f90  (revision 227316)
+++ ieee_7.f90  (working copy)
@@ -33,8 +33,8 @@
   end if

   if (ieee_selected_real_kind(0,0,3) /= -5) call abort
-  if (ieee_selected_real_kind(precision(0._maxreal)+1) /= -1) call abort
-  if (ieee_selected_real_kind(0,range(0._maxreal)+1) /= -2) call abort
-  if (ieee_selected_real_kind(precision(0._maxreal)+1,range(0._maxreal)+1) /=
-3) call abort
+  if (ieee_selected_real_kind(100*precision(0._maxreal)) /= -1) call abort
+  if (ieee_selected_real_kind(0,100*range(0._maxreal)) /= -2) call abort
+  if (ieee_selected_real_kind(100*precision(0._maxreal),100*range(0._maxreal))
/= -3) call abort

 end
>From gcc-bugs-return-496927-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Sep 10 22:12:59 2015
Return-Path: <gcc-bugs-return-496927-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 80085 invoked by alias); 10 Sep 2015 22:12:59 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 80037 invoked by uid 48); 10 Sep 2015 22:12:55 -0000
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/67531] No IEEE rounding support for powerpc long double type
Date: Thu, 10 Sep 2015 22:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: fxcoudert at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: fxcoudert at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on assigned_to short_desc everconfirmed
Message-ID: <bug-67531-4-VDbAPjUT96@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67531-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67531-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-09/txt/msg00905.txt.bz2
Content-length: 700

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg531

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-10
           Assignee|unassigned at gcc dot gnu.org      |fxcoudert at gcc dot gnu.org
            Summary|FAIL:                       |No IEEE rounding support
                   |gfortran.dg/ieee/large_2.f9 |for powerpc long double
                   |0   -O0  execution test     |type
     Ever confirmed|0                           |1


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
                   ` (4 preceding siblings ...)
  2015-09-10 22:11 ` fxcoudert at gcc dot gnu.org
@ 2015-09-11 13:18 ` schwab@linux-m68k.org
  2015-09-14 11:12 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2015-09-11 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andreas Schwab <schwab@linux-m68k.org> ---
With that patch the test passes on all opt levels.


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

* [Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90   -O0  execution test
  2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
                   ` (5 preceding siblings ...)
  2015-09-11 13:18 ` schwab@linux-m68k.org
@ 2015-09-14 11:12 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-09-14 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |6.0


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

end of thread, other threads:[~2015-09-14 11:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-08 22:47 [Bug fortran/67509] New: [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test schwab@linux-m68k.org
2015-09-10 21:11 ` [Bug fortran/67509] " fxcoudert at gcc dot gnu.org
2015-09-10 21:27 ` pthaugen at gcc dot gnu.org
2015-09-10 21:39 ` fxcoudert at gcc dot gnu.org
2015-09-10 21:57 ` schwab@linux-m68k.org
2015-09-10 22:11 ` fxcoudert at gcc dot gnu.org
2015-09-11 13:18 ` schwab@linux-m68k.org
2015-09-14 11:12 ` rguenth at gcc dot gnu.org

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