Front page | perl.perl5.porters |
Postings from September 2000
[ID 20000915.009] exception during constant folding optimization
Thread Next
From:
Trevor Blackwell
Date:
September 15, 2000 18:09
Subject:
[ID 20000915.009] exception during constant folding optimization
Message ID:
200009160106.SAA07571@cholera.yahoo.com
This is a bug report for perl from tlb@yahoo-inc.com,
generated with the help of perlbug 1.26 running under perl 5.00501.
-----------------------------------------------------------------
[Please enter your report here]
The following program fails, because the Perl optimizer recognizes
that sqrt of a constant can be computed at compile time, and the
constant evaluation produces an exception.
#!/usr/local/bin/perl
if (0) {
print sqrt(-5);
}
This seems like a Bad Thing. An optimizer shouldn't change the behavior of
a program.
Probably, the right thing is to either skip the optimization when
an exception occurs during constant evaluation, or to optimize the call to an
exception-producing node (ie die) instead of a constant.
This fails identically using both 5.005 and 5.6.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl 5.00501:
Configured by bryan at Wed Jul 29 22:03:24 PDT 1998.
Summary of my perl5 (5.0 patchlevel 5 subversion 1) configuration:
Platform:
osname=freebsd, osvers=2.2.7-stable, archname=i386-freebsd
uname='freebsd priapism.yahoo.com 2.2.7-stable freebsd 2.2.7-stable #0: tue jul 21 21:19:32 pdt 1998 root@priapism.yahoo.com:usrsrcsyscompileyahoo i386 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=2.7.2.1
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=true
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib
libs=-lgdbm -lm -lc -lcrypt
libc=/usr/lib/libc.so.3.1, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fpic', lddlflags='-Bshareable -L/usr/local/lib'
Locally applied patches:
---
@INC for perl 5.00501:
/usr/wg/local/i386-freebsd
/usr/wg/local
/usr/local/lib/perl5.00501/i386-freebsd
/usr/local/lib/perl5.00501
/usr/local/lib/perl5.00501/site_perl/i386-freebsd
/usr/local/lib/perl5.00501/site_perl
.
---
Environment for perl 5.00501:
HOME=/homes/tlb
LANG (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/homes/tlb/bin:/sbin:/usr/sbin:/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/wg/bin:/usr/wg/local/bin:/usr/verylocal/bin
PERL5LIB=/usr/wg/local
PERL_BADLANG (unset)
SHELL=/usr/local/bin/bash
Thread Next
-
[ID 20000915.009] exception during constant folding optimization
by Trevor Blackwell