https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80064
Bug ID: 80064
Summary: [7 Regression] _Iter_cmp_iter instantiates bogus type
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
The following testcase extracted from Cython is no longer accepted with G++7:
> g++-7 -c t.C
In file included from /usr/include/c++/7/bits/stl_algobase.h:71:0,
from /usr/include/c++/7/algorithm:61,
from t.C:1:
/usr/include/c++/7/bits/predefined_ops.h: In instantiation of ‘struct
__gnu_cxx::__ops::_Iter_comp_iter<bool(int, int)>’:
/usr/include/c++/7/bits/stl_heap.h:394:51: required from ‘void
std::make_heap(_RAIter, _RAIter, _Compare) [with _RAIter =
__gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Compare = bool(int,
int)]’
t.C:8:34: required from here
/usr/include/c++/7/bits/predefined_ops.h:132:16: error: field
‘__gnu_cxx::__ops::_Iter_comp_iter<bool(int, int)>::_M_comp’ invalidly declared
function type
_Compare _M_comp;
^~~~~~~
while it is just fine with g++6:
> g++-6 -c t.C
>