public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49187] New: parallel mode compilation broken - unqualified lookup? (bisected)
@ 2011-05-27  8:23 gcc at abeckmann dot de
  2011-05-27 10:05 ` [Bug c++/49187] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gcc at abeckmann dot de @ 2011-05-27  8:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49187

           Summary: parallel mode compilation broken - unqualified lookup?
                    (bisected)
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@abeckmann.de
                CC: jason@gcc.gnu.org


Parallel mode compilation of the following small test fails in current trunk
(r174320):

g++ -W -Wall -D_GLIBCXX_PARALLEL -c parasort.cc
====== 8< =====
#include <vector>
#include <algorithm>

int main()
{
        std::vector<int> v;
        std::sort(v.begin(), v.end());
}
====== >8 =====

This regression was introduced in
    r173965 | jason | 2011-05-20 20:01:22 +0200 (Fri, 20 May 2011) | 33 lines
        PR c++/24163
        PR c++/29131
    gcc/cp/
        * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Avoid repeating
        unqualified lookup.
        * semantics.c (perform_koenig_lookup): Add complain parm.
        ...
    libstdc++-v3/
        * (multiple headers): Explicitly qualify calls to
        functions from dependent bases.
        ...

As this seems to be an intentional change, the parallel mode headers need to be
adjusted as well.

g++ -W -Wall -D_GLIBCXX_PARALLEL -c parasort.cc
In file included from
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/sort.h:44:0,
                 from
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/algo.h:45,
                 from
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/algorithm:38,
                 from
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm:66,
                 from parasort.cc:2:
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_mergesort.h:
In member function 'void __gnu_parallel::_SplitConsistently<true, _RAIter,
_Compare, _SortingPlacesIterator>::operator()(__gnu_parallel::_ThreadIndex,
__gnu_parallel::_PMWMSSortingData<_RAIter>*, _Compare&, typename
std::iterator_traits<_II1>::difference_type) const [with _RAIter =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >, _Compare =
std::less<int>, _SortingPlacesIterator = int*, __gnu_parallel::_ThreadIndex =
short unsigned int, typename std::iterator_traits<_II1>::difference_type = long
int]':
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_mergesort.h:347:7:
  instantiated from 'void
__gnu_parallel::parallel_sort_mwms_pu(__gnu_parallel::_PMWMSSortingData<_RAIter>*,
_Compare&) [with bool __stable = false, bool __exact = true, _RAIter =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >, _Compare =
std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_mergesort.h:462:9:
  instantiated from 'void __gnu_parallel::parallel_sort_mwms(_RAIter, _RAIter,
_Compare, __gnu_parallel::_ThreadIndex) [with bool __stable = false, bool
__exact = true, _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int>
>, _Compare = std::less<int>, __gnu_parallel::_ThreadIndex = short unsigned
int]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/sort.h:103:7:
  instantiated from 'void __gnu_parallel::__parallel_sort(_RAIter, _RAIter,
_Compare, __gnu_parallel::multiway_mergesort_exact_tag) [with bool __stable =
false, _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >,
_Compare = std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/sort.h:183:7:
  instantiated from 'void __gnu_parallel::__parallel_sort(_RAIter, _RAIter,
_Compare, __gnu_parallel::default_parallel_tag) [with bool __stable = false,
_RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >, _Compare =
std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/algo.h:1772:11:
  instantiated from 'void std::__parallel::sort(_RAIter, _RAIter, _Compare,
_Parallelism) [with _RAIter = __gnu_cxx::__normal_iterator<int*,
std::vector<int> >, _Compare = std::less<int>, _Parallelism =
__gnu_parallel::default_parallel_tag]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/algo.h:1786:7:
  instantiated from 'void std::__parallel::sort(_RAIter, _RAIter) [with _RAIter
= __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
parasort.cc:7:30:   instantiated from here
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_mergesort.h:153:4:
error: 'multiseq_partition' was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiseq_selection.h:130:50:
note: 'template<class _RanSeqs, class _RankType, class _RankIterator, class
_Compare> void __gnu_parallel::multiseq_partition(_RanSeqs, _RanSeqs,
_RankType, _RankIterator, _Compare)' declared here, later in the translation
unit

<snipped some more of these errors>

/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/losertree.h:
In member function 'unsigned int __gnu_parallel::_LoserTree<false, _Tp,
_Compare>::__init_win
ner(unsigned int) [with _Tp = int, _Compare = std::less<int>]':
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/losertree.h:310:9:
  instantiated from 'void __gnu_parallel::_LoserTree<false, _Tp,
_Compare>::__init() [w
ith _Tp = int, _Compare = std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_merge.h:522:7:
  instantiated from '_RAIter3
__gnu_parallel::multiway_merge_loser_tree(_RAIterIte
rator, _RAIterIterator, _RAIter3, _DifferenceTp, _Compare) [with _LT =
__gnu_parallel::_LoserTree<false, int, std::less<int> >, _RAIterIterator =
__gnu_cxx::__normal_iterator<std::pair<int*, int*>*, std::v
ector<std::pair<int*, int*>, std::allocator<std::pair<int*, int*> > > >,
_RAIter3 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >, _DifferenceTp
= long int, _Compare = std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_merge.h:893:75:
  instantiated from '_RAIter3
__gnu_parallel::__multiway_merge_k_variant_sentinel
_switch<false, __stable, _RAIterIterator, _RAIter3, _DifferenceTp,
_Compare>::operator()(_RAIterIterator, _RAIterIterator, _RAIter3, const
typename std::iterator_traits<typename std::iterator_traits<_RAIte
rIterator>::value_type::first_type>::value_type&, _DifferenceTp, _Compare)
[with bool __stable = false, _RAIterIterator =
__gnu_cxx::__normal_iterator<std::pair<int*, int*>*,
std::vector<std::pair<int*, in
t*>, std::allocator<std::pair<int*, int*> > > >, _RAIter3 =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >, _DifferenceTp = long
int, _Compare = std::less<int>, typename std::iterator_traits<typenam
e std::iterator_traits<_RAIterIterator>::value_type::first_type>::value_type =
int]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_merge.h:984:4:
  instantiated from '_RAIter3
__gnu_parallel::__sequential_multiway_merge(_RAIterI
terator, _RAIterIterator, _RAIter3, const typename
std::iterator_traits<typename
std::iterator_traits<_RAIterIterator>::value_type::first_type>::value_type&,
_DifferenceTp, _Compare) [with bool __stable =
false, bool __sentinels = false, _RAIterIterator =
__gnu_cxx::__normal_iterator<std::pair<int*, int*>*,
std::vector<std::pair<int*, int*>, std::allocator<std::pair<int*, int*> > > >,
_RAIter3 = __gnu_cxx::
__normal_iterator<int*, std::vector<int> >, _DifferenceTp = long int, _Compare
= std::less<int>, typename std::iterator_traits<typename
std::iterator_traits<_RAIterIterator>::value_type::first_type>::value
_type = int]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_merge.h:1432:44:
  instantiated from '_RAIterOut
__gnu_parallel::multiway_merge(_RAIterPairIterat
or, _RAIterPairIterator, _RAIterOut, _DifferenceTp, _Compare,
__gnu_parallel::sequential_tag) [with _RAIterPairIterator =
__gnu_cxx::__normal_iterator<std::pair<int*, int*>*,
std::vector<std::pair<int*, in
t*>, std::allocator<std::pair<int*, int*> > > >, _RAIterOut =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >, _DifferenceTp = long
int, _Compare = std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_mergesort.h:297:9:
  [ skipping 2 instantiation contexts ]
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/multiway_mergesort.h:462:9:
  instantiated from 'void __gnu_parallel::parallel_sort_mwms(_RAIter, _RAIter,
 _Compare, __gnu_parallel::_ThreadIndex) [with bool __stable = false, bool
__exact = true, _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int>
>, _Compare = std::less<int>, __gnu_parallel::_Threa
dIndex = short unsigned int]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/sort.h:103:7:
  instantiated from 'void __gnu_parallel::__parallel_sort(_RAIter, _RAIter,
_Compare, __gnu_
parallel::multiway_mergesort_exact_tag) [with bool __stable = false, _RAIter =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >, _Compare =
std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/sort.h:183:7:
  instantiated from 'void __gnu_parallel::__parallel_sort(_RAIter, _RAIter,
_Compare, __gnu_
parallel::default_parallel_tag) [with bool __stable = false, _RAIter =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >, _Compare =
std::less<int>]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/algo.h:1772:11:
  instantiated from 'void std::__parallel::sort(_RAIter, _RAIter, _Compare,
_Parallelism)
[with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >, _Compare
= std::less<int>, _Parallelism = __gnu_parallel::default_parallel_tag]'
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/algo.h:1786:7:
  instantiated from 'void std::__parallel::sort(_RAIter, _RAIter) [with _RAIter
= __gnu_cxx
::__normal_iterator<int*, std::vector<int> >]'
parasort.cc:7:30:   instantiated from here
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/losertree.h:290:6:
error: '_M_comp' was not declared in this scope, and no declarations were found
by argu
ment-dependent lookup at the point of instantiation [-fpermissive]
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/losertree.h:290:6:
note: declarations in dependent base '__gnu_parallel::_LoserTreeBase<int,
std::less<int
> >' are not found by unqualified lookup
/tmp/bisect47/bisect/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/parallel/losertree.h:290:6:
note: use 'this->_M_comp' instead


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/49187] parallel mode compilation broken - unqualified lookup? (bisected)
  2011-05-27  8:23 [Bug c++/49187] New: parallel mode compilation broken - unqualified lookup? (bisected) gcc at abeckmann dot de
@ 2011-05-27 10:05 ` redi at gcc dot gnu.org
  2011-05-27 11:06 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2011-05-27 10:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49187

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-27 09:34:45 UTC ---
yes, the change was intentional but these parts must have been missed, see the
thread beginning at http://gcc.gnu.org/ml/libstdc++/2011-05/msg00072.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/49187] parallel mode compilation broken - unqualified lookup? (bisected)
  2011-05-27  8:23 [Bug c++/49187] New: parallel mode compilation broken - unqualified lookup? (bisected) gcc at abeckmann dot de
  2011-05-27 10:05 ` [Bug c++/49187] " redi at gcc dot gnu.org
@ 2011-05-27 11:06 ` paolo.carlini at oracle dot com
  2011-05-27 16:37 ` [Bug libstdc++/49187] " paolo at gcc dot gnu.org
  2011-05-27 16:39 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-27 11:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49187

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.05.27 11:03:49
                 CC|jason at gcc dot gnu.org    |
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-27 11:03:49 UTC ---
Ok, let me handle this. Note: check-parallel should be more than enough, we
don't need a testcase.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/49187] parallel mode compilation broken - unqualified lookup? (bisected)
  2011-05-27  8:23 [Bug c++/49187] New: parallel mode compilation broken - unqualified lookup? (bisected) gcc at abeckmann dot de
  2011-05-27 10:05 ` [Bug c++/49187] " redi at gcc dot gnu.org
  2011-05-27 11:06 ` paolo.carlini at oracle dot com
@ 2011-05-27 16:37 ` paolo at gcc dot gnu.org
  2011-05-27 16:39 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-05-27 16:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49187

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-05-27 16:35:43 UTC ---
Author: paolo
Date: Fri May 27 16:35:36 2011
New Revision: 174342

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174342
Log:
2011-05-27  Paolo Carlini  <paolo.carlini@oracle.com>

    PR libstdc++/49187
    * include/parallel/losertree.h: Add missing using declarations
    of _Base::_M_comp.
    * include/parallel/algobase.h: Include <parallel/algorithmfwd.h>.
    * include/parallel/multiway_merge.h: Include <parallel/
    multiseq_selection.h>, forward declare __merge_advance.
    * include/parallel/multiseq_selection.h: Don't include <parallel/
    sort.h> here.
    * include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp: Fix
    qualification of upper_bound.

    * testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc:
    Use dg-require-debug-mode.
    * testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc:
    Likewise.
    * testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc:
    Likewise.

    * include/parallel/algo.h: Minor uglification fixes.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp
    trunk/libstdc++-v3/include/parallel/algo.h
    trunk/libstdc++-v3/include/parallel/algobase.h
    trunk/libstdc++-v3/include/parallel/losertree.h
    trunk/libstdc++-v3/include/parallel/multiseq_selection.h
    trunk/libstdc++-v3/include/parallel/multiway_merge.h
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc
   
trunk/libstdc++-v3/testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/49187] parallel mode compilation broken - unqualified lookup? (bisected)
  2011-05-27  8:23 [Bug c++/49187] New: parallel mode compilation broken - unqualified lookup? (bisected) gcc at abeckmann dot de
                   ` (2 preceding siblings ...)
  2011-05-27 16:37 ` [Bug libstdc++/49187] " paolo at gcc dot gnu.org
@ 2011-05-27 16:39 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-05-27 16:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49187

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-05-27 16:37:30 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-27 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27  8:23 [Bug c++/49187] New: parallel mode compilation broken - unqualified lookup? (bisected) gcc at abeckmann dot de
2011-05-27 10:05 ` [Bug c++/49187] " redi at gcc dot gnu.org
2011-05-27 11:06 ` paolo.carlini at oracle dot com
2011-05-27 16:37 ` [Bug libstdc++/49187] " paolo at gcc dot gnu.org
2011-05-27 16:39 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).