develooper Front page | perl.perl5.porters | Postings from September 2000

[ID 20000915.009] exception during constant folding optimization

Thread Next
Trevor Blackwell
September 15, 2000 18:09
[ID 20000915.009] exception during constant folding optimization
Message ID:
This is a bug report for perl from,
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.

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:
    osname=freebsd, osvers=2.2.7-stable, archname=i386-freebsd
    uname='freebsd 2.2.7-stable freebsd 2.2.7-stable #0: tue jul 21 21:19:32 pdt 1998 i386 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    cc='cc', optimize='-O', gccversion=
    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/, 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:

Environment for perl 5.00501:
    LANG (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