Bug 210107 - Was trying to compile the attached file; g++ crashes
Summary: Was trying to compile the attached file; g++ crashes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-10 01:35 UTC by Ben Lerner
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.1.1-28
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-10 13:52:28 UTC
Type: ---
Embargoed:


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

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> > > > >)'



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