The attached file represents the preprocessed output of running 'g++ sudoku.cpp'. I'm not sure exactly what's wrong with it, but the latest changes were working on the functions cp and mcp. (NOTE: I'm well aware this is not the best way to write this sort of program; it's for an research project test case. :) The exact output was [blerner@hugh ~] g++ sudoku.cpp /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_function.h: In function âstd::binder1st<_Operation> std::bind1st(const _Operation&, const _Tp&) [with _Operation = std::pointer_to_binary_function<std::list<char, std::allocator<char> > (*)(char), std::list<char, std::allocator<char> >, std::list<std::list<char, std::allocator<char> >, std::allocator<std::list<char, std::allocator<char> > > > >, _Tp = Choices ()(char)]â: sudoku.cpp:139: instantiated from here /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../../include/c++/4.1.1/bits/stl_function.h:421: internal compiler error: in build_c_cast, at cp/typeck.c:5340 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/cc9KSgth.out file, please attach this to your bugreport. [blerner@hugh ~]
Created attachment 138106 [details] g++ output as described above
I've since been playing around with some variations on the program. It looks like the culprit is in the choices function, and in particular with its use of the bind1st function. So my comment about cp and mcp above were red herrings; sorry about that.
Fixed in gcc-4.1.1-28 (rawhide/FC6). This just reports an error in the source: sudoku.cpp: In function `std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > > cp(std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > >) [with A = char]': sudoku.cpp:245: instantiated from here sudoku.cpp:144: error: no matching function for call to `cp(std::list<std::list<char, std::allocator<char> >, std::allocator<std::list<char, std::allocator<char> > > >&, std::_List_iterator<std::list<char, std::allocator<char> > >)' sudoku.cpp: In function `std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > > cp(std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > >) [with A = std::list<char, std::allocator<char> >]': sudoku.cpp:173: instantiated from `std::list<std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > >, std::allocator<std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > > > > mcp(std::list<std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > >, std::allocator<std::list<std::list<A, std::allocator<_CharT> >, std::allocator<std::list<A, std::allocator<_CharT> > > > > >) [with A = char]' sudoku.cpp:205: instantiated from here sudoku.cpp:144: error: no matching function for call to `cp(std::list<std::list<std::list<char, std::allocator<char> >, std::allocator<std::list<char, std::allocator<char> > > >, std::allocator<std::list<std::list<char, std::allocator<char> >, std::allocator<std::list<char, std::allocator<char> > > > > >&, std::_List_iterator<std::list<std::list<char, std::allocator<char> >, std::allocator<std::list<char, std::allocator<char> > > > >)'