From patchwork Mon Apr 11 17:49:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 90629 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 42F9FB6F14 for ; Tue, 12 Apr 2011 03:49:40 +1000 (EST) Received: (qmail 11480 invoked by alias); 11 Apr 2011 17:49:35 -0000 Received: (qmail 11448 invoked by uid 22791); 11 Apr 2011 17:49:28 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp207.alice.it (HELO smtp207.alice.it) (82.57.200.103) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Apr 2011 17:49:14 +0000 Received: from [192.168.1.4] (79.33.222.23) by smtp207.alice.it (8.5.124.08) id 4C9E16C910794494; Mon, 11 Apr 2011 19:49:07 +0200 Message-ID: <4DA33F10.2090605@oracle.com> Date: Mon, 11 Apr 2011 19:49:04 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ , Johannes Singler Subject: [v3] Actually run some tests in parallel-mode for check-parallel X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, noticed last week. Enabling the tests is also useful to have a clearer picture of which parallel-mode std algorithms need to be fixed vs C++0x. Tested x86_64-linux check-parallel, committing to mainline. Paolo. ////////////////////// 2011-04-11 Paolo Carlini * testsuite/25_algorithms/inplace_merge/moveable.cc: Actually run it in parallel-mode for check-parallel. * testsuite/25_algorithms/rotate/moveable.cc: Likewise. * testsuite/25_algorithms/stable_partition/moveable.cc: Likewise. * testsuite/25_algorithms/remove/moveable.cc: Likewise. * testsuite/25_algorithms/sort_heap/check_compare_by_value.cc: Likewise. * testsuite/25_algorithms/unique/moveable.cc: Likewise. * testsuite/25_algorithms/remove_if/moveable.cc: Likewise. * testsuite/25_algorithms/heap/moveable.cc: Likewise. * testsuite/25_algorithms/next_permutation/moveable.cc: Only skip the tests based on std::lexicographical_compare for check-parallel. * testsuite/25_algorithms/prev_permutation/moveable.cc: Likewise. Index: testsuite/25_algorithms/inplace_merge/moveable.cc =================================================================== --- testsuite/25_algorithms/inplace_merge/moveable.cc (revision 172263) +++ testsuite/25_algorithms/inplace_merge/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -19,10 +19,6 @@ // 25.3.4 [lib.alg.merge] -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include Index: testsuite/25_algorithms/rotate/moveable.cc =================================================================== --- testsuite/25_algorithms/rotate/moveable.cc (revision 172263) +++ testsuite/25_algorithms/rotate/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -24,10 +24,6 @@ #undef _GLIBCXX_CONCEPT_CHECKS -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include @@ -43,8 +39,6 @@ typedef test_container Bcontainer; typedef test_container Rcontainer; - - void test1() { Index: testsuite/25_algorithms/stable_partition/moveable.cc =================================================================== --- testsuite/25_algorithms/stable_partition/moveable.cc (revision 172263) +++ testsuite/25_algorithms/stable_partition/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -19,10 +19,6 @@ // 25.2.12 [lib.alg.partitions] Partitions. -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include Index: testsuite/25_algorithms/remove/moveable.cc =================================================================== --- testsuite/25_algorithms/remove/moveable.cc (revision 172263) +++ testsuite/25_algorithms/remove/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -22,10 +22,6 @@ #undef _GLIBCXX_CONCEPT_CHECKS -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include Index: testsuite/25_algorithms/sort_heap/check_compare_by_value.cc =================================================================== --- testsuite/25_algorithms/sort_heap/check_compare_by_value.cc (revision 172263) +++ testsuite/25_algorithms/sort_heap/check_compare_by_value.cc (working copy) @@ -19,10 +19,6 @@ #undef _GLIBCXX_CONCEPT_CHECKS -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include Index: testsuite/25_algorithms/next_permutation/moveable.cc =================================================================== --- testsuite/25_algorithms/next_permutation/moveable.cc (revision 172263) +++ testsuite/25_algorithms/next_permutation/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -19,10 +19,6 @@ // 25.3.9 [lib.alg.permutation.generators] -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include @@ -82,8 +78,13 @@ std::copy(array, array + 6, temp_array); Container con(temp_array, temp_array + 6); VERIFY( next_permutation(array, array + 6) ); + +// XXX FIXME: parallel-mode should deal correctly with moveable-only types +// per C++0x, at minimum smoothly fall back to serial. +#ifndef _GLIBCXX_PARALLEL VERIFY( std::lexicographical_compare(temp_array, temp_array + 6, array, array + 6) ); +#endif } VERIFY( !next_permutation(array,array + 6) ); for(int i = 0; i < 6; ++i) @@ -106,8 +107,13 @@ std::copy(array, array + 6, temp_array); Container con(temp_array, temp_array + 6); VERIFY( next_permutation(array, array + 6, are_ordered) ); + +// XXX FIXME: parallel-mode should deal correctly with moveable-only types +// per C++0x, at minimum smoothly fall back to serial. +#ifndef _GLIBCXX_PARALLEL VERIFY( std::lexicographical_compare(temp_array, temp_array + 6, array, array + 6, are_ordered) ); +#endif } VERIFY( !next_permutation(array,array + 6, are_ordered) ); for(int i = 0; i < 6; ++i) Index: testsuite/25_algorithms/prev_permutation/moveable.cc =================================================================== --- testsuite/25_algorithms/prev_permutation/moveable.cc (revision 172263) +++ testsuite/25_algorithms/prev_permutation/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2009, 2010 Free Software Foundation, Inc. +// Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -19,10 +19,6 @@ // 25.3.9 [lib.alg.permutation.generators] -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include @@ -82,8 +78,13 @@ std::copy(array, array + 6, temp_array); Container con(temp_array, temp_array + 6); VERIFY( prev_permutation(array, array + 6) ); + +// XXX FIXME: parallel-mode should deal correctly with moveable-only types +// per C++0x, at minimum smoothly fall back to serial. +#ifndef _GLIBCXX_PARALLEL VERIFY( !std::lexicographical_compare(temp_array, temp_array + 6, array, array + 6) ); +#endif } VERIFY( !prev_permutation(array,array + 6)) ; for(int i = 0; i < 6; ++i) @@ -106,8 +107,13 @@ std::copy(array, array + 6, temp_array); Container con(temp_array, temp_array + 6); VERIFY( prev_permutation(array, array + 6, are_ordered) ); + +// XXX FIXME: parallel-mode should deal correctly with moveable-only types +// per C++0x, at minimum smoothly fall back to serial. +#ifndef _GLIBCXX_PARALLEL VERIFY( !std::lexicographical_compare(temp_array, temp_array + 6, array, array + 6, are_ordered) ); +#endif } VERIFY( !prev_permutation(array,array + 6, are_ordered) ); for(int i = 0; i < 6; ++i) Index: testsuite/25_algorithms/unique/moveable.cc =================================================================== --- testsuite/25_algorithms/unique/moveable.cc (revision 172263) +++ testsuite/25_algorithms/unique/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -22,10 +22,6 @@ #undef _GLIBCXX_CONCEPT_CHECKS -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include Index: testsuite/25_algorithms/remove_if/moveable.cc =================================================================== --- testsuite/25_algorithms/remove_if/moveable.cc (revision 172263) +++ testsuite/25_algorithms/remove_if/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -22,10 +22,6 @@ #undef _GLIBCXX_CONCEPT_CHECKS -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include Index: testsuite/25_algorithms/heap/moveable.cc =================================================================== --- testsuite/25_algorithms/heap/moveable.cc (revision 172263) +++ testsuite/25_algorithms/heap/moveable.cc (working copy) @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -24,10 +24,6 @@ #undef _GLIBCXX_CONCEPT_CHECKS -// XXX FIXME: parallel-mode should deal correctly with moveable-only types -// per C++0x, at minimum smoothly fall back to serial. -#undef _GLIBCXX_PARALLEL - #include #include #include