fuchs@it.uka.de (Harald Fuchs) (12/06/90)
Archive-name: gnu/gcc/pmax/1990-12-06 Archive: foobar.colorado.edu:/pub/Gnu-For-Pmax [128.138.243.105] Original-posting-by: fuchs@it.uka.de (Harald Fuchs) Original-subject: Re: perl bugs in pl41 Reposted-by: emv@ox.com (Edward Vielmetti) rep@genrad.com (Pete Peterson) writes: > The following bugs all exist in perl 3.41 on all platforms unless otherwise >noted. >There is a bug on the pmax (decstation) which appears to relate to integers >with the MSB set. The following works fine on suns and vaxes but fails in >different ways with perl 3/18 and perl 3/41 on the pmaxen: >printf (" %x, %x, %x, %x\n", 0xffffffff, 0xf0000000, 0x81234567, ~0xffff); >printf (" %x, %x, %x\n", 0xfffffff<<4, 15 << 28, ~1); >$a = 0xffff0000 & 7; $b = 15 << 28 & 7; print " a is $a; b is $b\n"; >Should print (and does except on pmax): > ffffffff, f0000000, 81234567, ffff0000 > fffffff0, f0000000, fffffffe > a is 0; b is 0 >-------------------- >In perl41 on pmax, you get: > 7fffffff, 7fffffff, 7fffffff, 7fffffff > fffffff0, f0000000, 7fffffff > a is 7; b is 0 >-------------------- >In perl18 on pmax, you get: > ffffffff, f0000000, 81234567, 7fffffff > fffffff0, f0000000, 7fffffff > a is 0; b is 0 >This problem can be worked around by editing config.sh, at the end of >running Configure, to make "d_castneg='undef'". Alternatively, you could use a reasonable C compiler, e.g. gcc-osf-1.9.2.13.tar.Z from foobar.colorado.edu. I compiled perl with this gcc (even with -O!) and the script above returned the correct results. -- Harald Fuchs <fuchs@it.uka.de> <fuchs%it.uka.de@relay.cs.net> ... <fuchs@telematik.informatik.uni-karlsruhe.dbp.de> *gulp*