* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
@ 2012-10-09 9:21 ` ro at gcc dot gnu.org
2012-10-09 9:49 ` paolo.carlini at oracle dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ro at gcc dot gnu.org @ 2012-10-09 9:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
2012-10-09 9:21 ` [Bug libstdc++/54869] " ro at gcc dot gnu.org
@ 2012-10-09 9:49 ` paolo.carlini at oracle dot com
2012-10-09 10:15 ` dominiq at lps dot ens.fr
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-09 9:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-09 09:49:08 UTC ---
Guys, I don't have Sparc-Solaris machines and didn't design the testcase. To be
honest, I didn't even realize so far that this simd_* variant was meant for
other targets besides x86_64. Ulrich, please help a bit the target
maintainers...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
2012-10-09 9:21 ` [Bug libstdc++/54869] " ro at gcc dot gnu.org
2012-10-09 9:49 ` paolo.carlini at oracle dot com
@ 2012-10-09 10:15 ` dominiq at lps dot ens.fr
2012-10-09 10:21 ` paolo.carlini at oracle dot com
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-09 10:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|sparc*-*-solaris2* |sparc*-*-solaris2*
| |powerpc*-*-*
| |hppa-unknown-linux-gnu
| |s390-ibm-linux-gnu
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-09
Host|sparc*-*-solaris2* |sparc*-*-solaris2*
| |powerpc*-*-*
Ever Confirmed|0 |1
Build|sparc*-*-solaris2* |sparc*-*-solaris2*
| |powerpc*-*-*
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-09 10:14:45 UTC ---
Also fails for at least powerpc*-*-* (see
http://gcc.gnu.org/ml/gcc-testresults/2012-10/msg00888.html ),
hppa-unknown-linux-gnu (
http://gcc.gnu.org/ml/gcc-testresults/2012-10/msg00525.html ), and
s390-ibm-linux-gnu (
http://gcc.gnu.org/ml/gcc-testresults/2012-10/msg00602.html ). Endianness
issue?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (2 preceding siblings ...)
2012-10-09 10:15 ` dominiq at lps dot ens.fr
@ 2012-10-09 10:21 ` paolo.carlini at oracle dot com
2012-10-09 11:24 ` drepper.fsp at gmail dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-09 10:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-09 10:20:45 UTC ---
Can also be something even more trivial, because I bet we didn't exercise much
the codepath for __SSE2__ undefined before committing the code.
Actually - and this is a question for Ulrich - is the code actually useful when
__SSE2__ is undefined?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (3 preceding siblings ...)
2012-10-09 10:21 ` paolo.carlini at oracle dot com
@ 2012-10-09 11:24 ` drepper.fsp at gmail dot com
2012-10-09 11:29 ` paolo.carlini at oracle dot com
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: drepper.fsp at gmail dot com @ 2012-10-09 11:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #4 from Ulrich Drepper <drepper.fsp at gmail dot com> 2012-10-09 11:23:41 UTC ---
(In reply to comment #0)
> The new ext/random/simd_fast_mersenne_twister_engine/cons/default.cc testcase
> FAILs on Solaris/SPARC (both 32 and 64-bit):
That's expected. I mentioned when I posted the patches that the implementation
is for little endian machines. I don't have access to any big endian machines
and therefore didn't even try to make it work.
It might be sufficient, at end of _M_gen_rand, to swap the order of the four
32-bit words in a 128-bit word. I never tested this, someone else will have to
do this.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (4 preceding siblings ...)
2012-10-09 11:24 ` drepper.fsp at gmail dot com
@ 2012-10-09 11:29 ` paolo.carlini at oracle dot com
2012-10-09 11:35 ` dominiq at lps dot ens.fr
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-09 11:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-09 11:28:45 UTC ---
Ok, thanks, I missed that remark of yours. Well, at present nothing prevents
people with big endian machines to try to use the code, and we unconditionally
run the testsuite. That's not Ok.
Let's keep the PR open for a while in case somebody wants to try your
suggestion, otherwise, as far as I'm concerned, for 4.8.0, I will just disable
the code and its tests on big endian.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (5 preceding siblings ...)
2012-10-09 11:29 ` paolo.carlini at oracle dot com
@ 2012-10-09 11:35 ` dominiq at lps dot ens.fr
2012-10-09 11:39 ` dominiq at lps dot ens.fr
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-09 11:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-09 11:35:19 UTC ---
> ... I don't have access to any big endian machines
> and therefore didn't even try to make it work.
AFAICT there are big endian machines in the CompileFarm (see
http://gcc.gnu.org/wiki/CompileFarm ) and any maintainer has access to it.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (6 preceding siblings ...)
2012-10-09 11:35 ` dominiq at lps dot ens.fr
@ 2012-10-09 11:39 ` dominiq at lps dot ens.fr
2012-10-09 11:44 ` paolo.carlini at oracle dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-10-09 11:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-10-09 11:39:17 UTC ---
As Nathan Froyd said at
http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00772.html
"Please try to consider what's best for all the people who use GCC, not just
the cases you happen to be working with every day."
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (7 preceding siblings ...)
2012-10-09 11:39 ` dominiq at lps dot ens.fr
@ 2012-10-09 11:44 ` paolo.carlini at oracle dot com
2012-10-09 14:51 ` paolo at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-09 11:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-09 11:44:09 UTC ---
Boy, nobody cites me like that, at least, not while I'm still alive.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (8 preceding siblings ...)
2012-10-09 11:44 ` paolo.carlini at oracle dot com
@ 2012-10-09 14:51 ` paolo at gcc dot gnu.org
2012-10-09 14:53 ` paolo.carlini at oracle dot com
2012-10-09 15:05 ` ro at CeBiTec dot Uni-Bielefeld.DE
11 siblings, 0 replies; 13+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-10-09 14:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #9 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-10-09 14:50:31 UTC ---
Author: paolo
Date: Tue Oct 9 14:50:19 2012
New Revision: 192256
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192256
Log:
2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/54869
* include/ext/random (simd_fast_mersenne_twister_engine): Provide
only for little endian targets.
* include/ext/random.tcc: Likewise.
* config/cpu/i486/opt/ext/opt_random.h: Likewise.
* testsuite/lib/libstdc++.exp (check_v3_target_little_endian): Add.
* testsuite/lib/dg-options.exp (dg-require-little-endian): Add.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
operators/equal.cc: Use the latter.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
operators/serialize.cc: Likewise.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
operators/inequal.cc: Likewise.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
cons/copy.cc: Likewise.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
cons/seed1.cc: Likewise.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
cons/seed2.cc: Likewise.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
cons/default.cc: Likewise.
* testsuite/ext/random/simd_fast_mersenne_twister_engine/
cons/seed_seq.cc: Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/cpu/i486/opt/ext/opt_random.h
trunk/libstdc++-v3/include/ext/random
trunk/libstdc++-v3/include/ext/random.tcc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/copy.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/default.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/seed1.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/seed2.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/seed_seq.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/operators/equal.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/operators/inequal.cc
trunk/libstdc++-v3/testsuite/ext/random/simd_fast_mersenne_twister_engine/operators/serialize.cc
trunk/libstdc++-v3/testsuite/lib/dg-options.exp
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (9 preceding siblings ...)
2012-10-09 14:51 ` paolo at gcc dot gnu.org
@ 2012-10-09 14:53 ` paolo.carlini at oracle dot com
2012-10-09 15:05 ` ro at CeBiTec dot Uni-Bielefeld.DE
11 siblings, 0 replies; 13+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-09 14:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-09 14:53:14 UTC ---
If the problem is endianness should be fixed now. Providing an implementation
for big endian targets is enhancement.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libstdc++/54869] ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs
2012-10-09 9:19 [Bug libstdc++/54869] New: ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs ro at gcc dot gnu.org
` (10 preceding siblings ...)
2012-10-09 14:53 ` paolo.carlini at oracle dot com
@ 2012-10-09 15:05 ` ro at CeBiTec dot Uni-Bielefeld.DE
11 siblings, 0 replies; 13+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2012-10-09 15:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54869
--- Comment #11 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-10-09 15:05:31 UTC ---
> --- Comment #4 from Ulrich Drepper <drepper.fsp at gmail dot com>
> 2012-10-09 11:23:41 UTC ---
> (In reply to comment #0)
>> The new ext/random/simd_fast_mersenne_twister_engine/cons/default.cc testcase
>> FAILs on Solaris/SPARC (both 32 and 64-bit):
>
> That's expected. I mentioned when I posted the patches that the implementation
> is for little endian machines. I don't have access to any big endian machines
> and therefore didn't even try to make it work.
>
> It might be sufficient, at end of _M_gen_rand, to swap the order of the four
> 32-bit words in a 128-bit word. I never tested this, someone else will have to
> do this.
I'm not familiar with the code at all. Could you provide a tentative
patch for me to try?
Thanks.
Rainer
^ permalink raw reply [flat|nested] 13+ messages in thread