develooper Front page | perl.perl5.porters | Postings from January 2004

[perl #25249] int() rounds up on sparc64

Thread Next
January 24, 2004 19:49
[perl #25249] int() rounds up on sparc64
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #25249]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.34 running under perl v5.8.2.

perl 5.8.2 on NetBSD/sparc64 (big endian 64 bit) rounds up values greater
than 0.5 in int():

    NetBSD/sparc64 perl: 5.8.1, 5.8.2, 5.8.3, and 5.9.0
	# perl -e 'print int(9.1)," ",int(9.9),"\n";'
	9 10

The correct '9 9' output is generated from 5.6.1 on the same box

5.8.2 on NetBSD/sparc (big endian 32 bit), NetBSD/alpha
(little endian 64 bit) and NetBSD/i386 (little endian 32 bit) all
work correctly.

All compiled under gcc3-3. Initial version compiled via NetBSD's
pkgsrc system, but problem confiremd with vanilla compile with 
./Configure -dse

It may be a specific 64bit big endian issue, or the config for NetBSD/sparc64,
or a gcc3 ism.

Site configuration information for perl v5.8.2:

Configured by root at Sat Jan 24 00:30:04 GMT 2004.

Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
    osname=netbsd, osvers=1.6zh, archname=sparc64-netbsd
    uname='netbsd proton 1.6zh netbsd 1.6zh (generic) #1: fri jan 23 15:23:27 gmt 2004 sparc64 '
    config_args='-sde -Dprefix=/usr/pkg -Dscriptdir=/usr/pkg/bin -Darchname=sparc64-netbsd -Doptimize=-O2 -mcpu=v9  -pipe -Dinstallstyle=lib/perl5 -Ui_malloc -Uusemymalloc -Uinstallusrbinperl -Dman3ext=3 -Dman3dir=/usr/pkg/lib/perl5/5.8.2/man/man3 -Dsiteman3dir=/usr/pkg/lib/perl5/site_perl/man/man3 -Dman1dir=/usr/pkg/man/man1 -Dsiteprefix=/usr/pkg -Dsiteman1dir=/usr/pkg/man/man1 -Dcc=cc -Dlibswanted=m crypt -Duseshrplib'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/pkg/include',
    optimize='-O2 -mcpu=v9 -pipe',
    cppflags='-fno-strict-aliasing -I/usr/pkg/include'
    ccversion='', gccversion='3.3.2 (NetBSD nb1 20031026)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-R/usr/pkg/lib  -L/usr/pkg/lib'
    libpth=/usr/pkg/lib /usr/lib
    libs=-lm -lcrypt
    perllibs=-lm -lcrypt
    libc=/lib/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E  -Wl,-R/usr/pkg/lib/perl5/5.8.2/sparc64-netbsd/CORE'
    cccdlflags='-DPIC -fPIC ', lddlflags='--whole-archive -shared  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib'

Locally applied patches:

@INC for perl v5.8.2:

Environment for perl v5.8.2:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About