[Bug fortran/48404] New: SELECTED_REAL_KIND is returning KIND=16 when not available
brtnfld at hdfgroup dot org
gcc-bugzilla@gcc.gnu.org
Fri Apr 1 19:08:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48404
Summary: SELECTED_REAL_KIND is returning KIND=16 when not
available
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: brtnfld@hdfgroup.org
Testing for the REAL KIND available the program:
PROGRAM test_kind
IMPLICIT NONE
INTEGER :: i, j, ii, ir, last, rkind_numbers(10)
INTEGER :: jr, jd
last = -1
ir = 0
DO i = 1,100
j = SELECTED_REAL_KIND(i)
PRINT*,i,j
IF(j .NE. last) THEN
IF(last .NE. -1) THEN
ir = ir + 1
rkind_numbers(ir) = last
ENDIF
last = j
IF(j .EQ. -1) EXIT
ENDIF
ENDDO
PRINT*,'KINDS SUPPORTED = ', rkind_numbers(1:ir)
END PROGRAM test_kind
returns KIND=4,8,10,16
but KIND=16 is not supported when using the same compiler on the same machine:
REAL(KIND=16) :: x
1
Error: Kind 16 not supported for type REAL at (1)
This happens for:
Linux 2.6.18-194.3.1.el5PAE #1 SMP i686 i686 i386 GNU/Linux (gcc 4.5.2, 4.4.5,
4.3.5, *4.2.4 does not return KIND=16 )
Linux 2.6.18-194.32.1.el5 #1 SMP x86_64 x86_64 x86_64 GNU/Linux (gcc 4.5.2)
FreeBSD 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #0 amd64 (gcc 4.5.2)
Does not happen (KIND!=16) for:
Version 4.5.1 on Suse 11.4 Linux 2.6.37.1-1.2-desktop #1 SMP PREEMPT x86_64
x86_64 x86_64 GNU/Linux
More information about the Gcc-bugs
mailing list