Bug 210107

Summary: Was trying to compile the attached file; g++ crashes
Product: [Fedora] Fedora Reporter: Ben Lerner <benjamin.lerner+redhat>
Component: gcc4Assignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 4.1.1-28 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-10 13:52:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
g++ output as described above none

Description Ben Lerner 2006-10-10 01:35:18 UTC
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 ~]

Comment 1 Ben Lerner 2006-10-10 01:35:19 UTC
Created attachment 138106 [details]
g++ output as described above

Comment 2 Ben Lerner 2006-10-10 02:05:49 UTC
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.

Comment 3 Jakub Jelinek 2006-10-10 13:52:28 UTC
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> > > > >)'