https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62045
Xi Ruoyao <ryxi at stu dot xidian.edu.cn> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bkoz at redhat dot com,
| |ryxi at stu dot xidian.edu.cn
--- Comment #1 from Xi Ruoyao <ryxi at stu dot xidian.edu.cn> ---
A simple stupid test case:
~~~
#include <ext/pb_ds/priority_queue.hpp>
#include <functional>
__gnu_pbds::priority_queue<int, std::less<int>,
__gnu_pbds::binary_heap_tag> pq;
extern "C" unsigned alarm (unsigned);
int main ()
{
alarm(1);
for (int i = 0; i < 1000000; i++)
pq.push(i);
return 0;
}
~~~
$ g++-4.6 pr62045.cpp && ./a.out
$ g++-5.3 pr62045.cpp && ./a.out
Alarm clock
$ g++-6.3 pr62045.cpp && ./a.out
Alarm clock
$ g++-7-svn pr62045.cpp && ./a.out
Alarm clock
Start from r174100
2011-05-23 Benjamin Kosnik <[email protected]>
PR libstdc++/37144
PR libstdc++/28457
Interface changes for ext/pb_ds.
PB_DS_BASE_C_DEC to unique PB_DS_*_BASE macros.
Add Benjamin to cc list.
I think the call "is_heap()" is unnecessary since there are
"PB_DS_ASSERT_VALID"s around the call to "push_heap". If this
"is_heap" is necessary, this priority_queue won't work in
debug mode (-D_GLIBCXX_DEBUG).