Home My Page Projects MPFR
Summary Activity Forums Tracker Lists Tasks Docs News SCM Files

[#14435] Numerous test failures on hppa2.0w-hp-hpux11.00

2012-06-19 17:49
Submitted by:
Daniel Richard G. (skunk)
Assigned to:
Nobody (None)
Target Version:
Numerous test failures on hppa2.0w-hp-hpux11.00

Detailed description
I can build MPFR on this platform with the vendor compiler, but the test suite does not go well. This is for the current form of the 3.1 branch, obtained from


Here is what I get:

gmake check-TESTS
gmake[2]: Entering directory `/home/cport/tmp/mpfr-3.1.1-dev/_build/tests'
[tversion] GMP: header 5.0.5, library 5.0.5
[tversion] MPFR tuning parameters from default
PASS: tversion
PASS: tinternals
PASS: tinits
PASS: tisqrt
PASS: tsgn
PASS: tcheck
PASS: tisnan
PASS: texceptions
PASS: tset_exp
PASS: tset
PASS: mpf_compat
PASS: mpfr_compat
PASS: reuse
PASS: tabs
PASS: tacos
PASS: tacosh
PASS: tadd
PASS: tadd1sp
Inexact flag error in mpfr_add_d (1)
FAIL: tadd_d
PASS: tadd_ui
PASS: tagm
PASS: tai
PASS: tasin
PASS: tasinh
PASS: tatan
PASS: tatanh
PASS: taway
PASS: tbuildopt
PASS: tcan_round
PASS: tcbrt
Error in mpfr_cmp with x=7.38076162788329440000e-01, y=8.17863699638849640000e-01 mpfr_cmp(x,y)=0
FAIL: tcmp
Error in mpfr_cmp2 for
got 0 instead of 1
FAIL: tcmp2
Error in mpfr_cmp_d 2.345 and 2.0
FAIL: tcmp_d
PASS: tcmp_ld
PASS: tcmp_ui
PASS: tcmpabs
PASS: tcomparisons
PASS: tconst_catalan
PASS: tconst_euler
PASS: tconst_log2
PASS: tconst_pi
PASS: tcopysign
PASS: tcos
PASS: tcosh
PASS: tcot
PASS: tcoth
PASS: tcsc
PASS: tcsch
Inexact flag error in mpfr_d_div
FAIL: td_div
Inexact flag error in mpfr_d_sub
FAIL: td_sub
PASS: tdigamma
PASS: tdim
PASS: tdiv
Inexact flag error in mpfr_div_d
FAIL: tdiv_d
PASS: tdiv_ui

That's all I've got, because at this point, the "teint" test spins (seemingly) forever.

GMP 5.0.5 builds cleanly on this system, and its "make check" passes all tests.
Message  ↓
Date: 2012-07-20 14:00
Sender: Vincent Lefèvre

From debugging information (sent privately), there is at least a bug related to a double to unsigned long conversion on the platform (when the double is an integer representable in an unsigned long). Not a bug in MPFR. Closing.

Date: 2012-06-20 18:07
Sender: Daniel Richard G.

I tried an MPFR build with GCC. It still links against a GMP built with the HP compiler, and thus doesn't use compiler flags beyond -g -O2. But all the tests pass. It appears that a compiler bug may be at fault.

I just sent you e-mail.

Date: 2012-06-20 08:18
Sender: Paul Zimmermann

the tset_d failure confirms the conversion from double to mpfr_t is wrong
(the other way seems correct).

I can help you to isolate the problem, but it will be easier by mail: please contact me
at Paul dot Zimmermann at inria dot fr.

By the way, did you try with GCC instead of the vendor compiler? We might also hit a bug of the vendor compiler.

Paul Zimmermann

Date: 2012-06-20 04:18
Sender: Daniel Richard G.

Here are the outputs from running those tests manually:

host:/tmp/mpfr-3.1.1-dev/_build/tests$ ./tset_d ; echo $?
Error in tset_d: expected 1.0, got 0.10E0
host:/tmp/mpfr-3.1.1-dev/_build/tests$ ./tget_d ; echo $?

The (gzipped) config.log file is attached.

Date: 2012-06-19 21:06
Sender: Paul Zimmermann

Daniel, it seems all tests involving machine floating-point numbers fail.
Maybe we wrongly recognize and convert to/from machine floating-point numbers. Please can you attach the config.log file, and run manually the tset_d and tget_d?

Paul Zimmermann

Size Name Date By Download
9 KiBconfig.log.gz2012-06-20 04:18skunkconfig.log.gz
Field Old Value Date By
status_idOpen2012-07-20 14:00vlefevre
close_dateNone2012-07-20 14:00vlefevre
ResolutionNone2012-07-20 14:00vlefevre
File Added2489: config.log.gz2012-06-20 04:18skunk