* [Bug testsuite/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
@ 2014-09-22 13:37 ` richard at netbsd dot org
2014-09-25 10:06 ` redi at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: richard at netbsd dot org @ 2014-09-22 13:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #1 from Richard PALO <richard at netbsd dot org> ---
BTW, I'm curious if the problem is related to float rounding in I/O, as in
FAIL: ext/random/hypergeometric_distribution/operators/values.cc execution test
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug testsuite/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
2014-09-22 13:37 ` [Bug testsuite/63332] " richard at netbsd dot org
@ 2014-09-25 10:06 ` redi at gcc dot gnu.org
2014-09-25 10:14 ` [Bug libstdc++/63332] " redi at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2014-09-25 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, there must be some difference that isn't visible in the serialized output,
which would imply the values fail to do a proper round trip, so we're not
writing them with enough precision.
Maybe we should use hexfloat output for serializing distributions, not decimal.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
2014-09-22 13:37 ` [Bug testsuite/63332] " richard at netbsd dot org
2014-09-25 10:06 ` redi at gcc dot gnu.org
@ 2014-09-25 10:14 ` redi at gcc dot gnu.org
2014-09-25 15:30 ` richard at netbsd dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2014-09-25 10:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|testsuite |libstdc++
Version|unknown |4.9.0
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The issue is not with VERIFY, which is just an assertion and so all it has to
do is check for true or false.
The assertion fails because distribution's operator== is saying the
distributions are not equal, so either the operator== is buggy (but that would
probably fail on all platforms) or the issue is in the serialization or
deserialization.
Could you please add -fno-access-control to the "dg-options" flags at the top
of the file and replace the VERIFY check with the following:
std::cout << (u._M_param._M_lambda == v._M_param._M_lambda) << '\n';
std::cout << (u._M_param._M_mu == v._M_param._M_mu) << '\n';
std::cout << (u._M_param._M_nu == v._M_param._M_nu) << '\n';
std::cout << (u._M_gd1 == v._M_gd1) << '\n';
std::cout << (u._M_gd2 == v._M_gd2) << '\n';
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (2 preceding siblings ...)
2014-09-25 10:14 ` [Bug libstdc++/63332] " redi at gcc dot gnu.org
@ 2014-09-25 15:30 ` richard at netbsd dot org
2014-09-25 16:04 ` richard at netbsd dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: richard at netbsd dot org @ 2014-09-25 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #4 from Richard PALO <richard at netbsd dot org> ---
>>Could you please add -fno-access-control to the "dg-options" flags at the top
>>of the file and replace the VERIFY check with the following:
>>std::cout << (u._M_param._M_lambda == v._M_param._M_lambda) << '\n';
>>std::cout << (u._M_param._M_mu == v._M_param._M_mu) << '\n';
>>std::cout << (u._M_param._M_nu == v._M_param._M_nu) << '\n';
>>std::cout << (u._M_gd1 == v._M_gd1) << '\n';
>>std::cout << (u._M_gd2 == v._M_gd2) << '\n';
Hi, seems I needed to add an #include <iostream>
but anyway, the output is:
1
1
1
1
0
BTW, I did this manually as I'm not very proficient with `runtest`, isn't there
a shortcut to somehow run only this test?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (3 preceding siblings ...)
2014-09-25 15:30 ` richard at netbsd dot org
@ 2014-09-25 16:04 ` richard at netbsd dot org
2014-09-25 16:08 ` richard at netbsd dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: richard at netbsd dot org @ 2014-09-25 16:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #5 from Richard PALO <richard at netbsd dot org> ---
By the way, in gdb, here are the complete u and v variables after
serialisation:
gdb) p u
$1 = {_M_param = {_M_lambda = 2, _M_mu = 1.5, _M_nu = 3}, _M_gd1 = {
_M_param = {_M_alpha = 2, _M_beta = 0.5, _M_malpha = 2,
_M_a2 = 0.25819888974716108}, _M_nd = {_M_param = {_M_mean = 0,
_M_stddev = 1}, _M_saved = -1.0868180442613568,
_M_saved_available = true}}, _M_gd2 = {_M_param = {_M_alpha = 3,
_M_beta = 0.5, _M_malpha = 3, _M_a2 = 0.20412414523193152}, _M_nd = {
_M_param = {_M_mean = 0, _M_stddev = 1}, _M_saved = 0.18913187340436784,
_M_saved_available = true}}}
(gdb) p v
$2 = {_M_param = {_M_lambda = 2, _M_mu = 1.5, _M_nu = 3}, _M_gd1 = {
_M_param = {_M_alpha = 2, _M_beta = 0.5, _M_malpha = 2,
_M_a2 = 0.25819888974716108}, _M_nd = {_M_param = {_M_mean = 0,
_M_stddev = 1}, _M_saved = -1.0868180442613568,
_M_saved_available = true}}, _M_gd2 = {_M_param = {_M_alpha = 3,
_M_beta = 0.5, _M_malpha = 3, _M_a2 = 0.20412414523193152}, _M_nd = {
_M_param = {_M_mean = 0, _M_stddev = 1}, _M_saved = 0.1891318734043678,
_M_saved_available = true}}}
I notice _M_saved in v is truncated by 1 (the trailing '4')...
that is, 16 and not 17 digits after the decimal are copied.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (4 preceding siblings ...)
2014-09-25 16:04 ` richard at netbsd dot org
@ 2014-09-25 16:08 ` richard at netbsd dot org
2014-09-25 16:18 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: richard at netbsd dot org @ 2014-09-25 16:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #6 from Richard PALO <richard at netbsd dot org> ---
sorry, I meant to say M_gd2._M_saved
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (5 preceding siblings ...)
2014-09-25 16:08 ` richard at netbsd dot org
@ 2014-09-25 16:18 ` redi at gcc dot gnu.org
2014-11-16 7:05 ` richard at netbsd dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2014-09-25 16:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Aha, so that's the culprit. I really think we should be outputting in an exact
format, not via conversion to/from decimal.
> BTW, I did this manually as I'm not very proficient with `runtest`, isn't
> there a shortcut to somehow run only this test?
Yep, in the $target/libstdc++-v3 build dir:
make check
RUNTESTFLAGS=conformance.exp=ext/random/k_distribution/operators/serialize.cc
You can also use shell wildcards e.g. RUNTESTFLAGS=conformance.exp=ext/*
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (6 preceding siblings ...)
2014-09-25 16:18 ` redi at gcc dot gnu.org
@ 2014-11-16 7:05 ` richard at netbsd dot org
2014-11-16 14:35 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: richard at netbsd dot org @ 2014-11-16 7:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #8 from Richard PALO <richard at netbsd dot org> ---
As far as the test as it currently is written, I now get:
>PASS: ext/random/k_distribution/operators/serialize.cc (test for excess errors)
>PASS: ext/random/k_distribution/operators/serialize.cc execution test
after the illumos platform fix : https://www.illumos.org/issues/5224
So this can probably be closed. Thanks
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (7 preceding siblings ...)
2014-11-16 7:05 ` richard at netbsd dot org
@ 2014-11-16 14:35 ` redi at gcc dot gnu.org
2020-10-08 14:05 ` redi at gcc dot gnu.org
2020-10-11 11:04 ` ro at CeBiTec dot Uni-Bielefeld.DE
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2014-11-16 14:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks for the update. I still wonder if it would be better to write the
floating point values out using hexadecimal notation.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (8 preceding siblings ...)
2014-11-16 14:35 ` redi at gcc dot gnu.org
@ 2020-10-08 14:05 ` redi at gcc dot gnu.org
2020-10-11 11:04 ` ro at CeBiTec dot Uni-Bielefeld.DE
10 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu.org @ 2020-10-08 14:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |i386-pc-solaris2.11
CC| |ro at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-10-08
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Looks like this is still failing for solaris 11:
https://gcc.gnu.org/pipermail/gcc-testresults/2020-October/610818.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test
2014-09-22 13:35 [Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test richard at netbsd dot org
` (9 preceding siblings ...)
2020-10-08 14:05 ` redi at gcc dot gnu.org
@ 2020-10-11 11:04 ` ro at CeBiTec dot Uni-Bielefeld.DE
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2020-10-11 11:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332
--- Comment #11 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> Looks like this is still failing for solaris 11:
> https://gcc.gnu.org/pipermail/gcc-testresults/2020-October/610818.html
True. However, the fact that the test only FAILs on Solaris 11.4/x86,
but not on 11.3 nor on sparc, makes me wonder if this might not be
another instances of PR fortran/94324.
^ permalink raw reply [flat|nested] 12+ messages in thread