Bug 210107 - Was trying to compile the attached file; g++ crashes
Was trying to compile the attached file; g++ crashes
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-09 21:35 EDT by Ben Lerner
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.1.1-28
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-10 09:52:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
g++ output as described above (889.67 KB, application/octet-stream)
2006-10-09 21:35 EDT, Ben Lerner
no flags Details

  None (edit)
Description Ben Lerner 2006-10-09 21:35:18 EDT
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-09 21:35:19 EDT
Created attachment 138106 [details]
g++ output as described above
Comment 2 Ben Lerner 2006-10-09 22:05:49 EDT
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 09:52:28 EDT
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> > > > >)'

Note You need to log in before you can comment on or make changes to this bug.