1// { dg-do assemble  }
2// Gives ICE on EGCS release branch as of 98/06/08 on i686-pc-linux-gnulibc1)
3// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
4// Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de>
5#include <list>
6#include <functional>
7#include <algorithm>
8#include <cassert>
9int main()
10{
11      std::list<int> l;
12      l.push_back(1);
13      l.push_back(2);
14
15      std::list<int>::iterator it =
16              std::find_if( l.begin(), l.end(),
17                       // This is a typo, it should be bind2nd, but an
18                       // ICE is not a very helpful diagnostic!
19                       std::binder2nd( std::equal_to<int>(), 2 ) ); // { dg-error "" }
20      assert( *(it) == 2 );
21}
22
23