Re: internal compiler error in gcc trunk when using std::map

2010-12-09 Thread Jonathan Wakely
On 10 December 2010 00:40, Nathan Ridge wrote:
>
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See  for instructions.

This mailing list is not the right way to report bugs, you should have
followed the instructions in the output you quoted. Had you searched
bugzilla you'd probably have found
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46701


internal compiler error in gcc trunk when using std::map

2010-12-09 Thread Nathan Ridge

Hello,
 
I've just build the gcc trunk and tried to compile some code that compiled fine 
with gcc 4.5.
It gave an internal compiler error.
I've reduced it to the following minimal test case:
 
#include 
#include 
int main()
{
std::map m;
std::pair p;
m.insert(p);
return 0;
}
 
Here's the command used to compile:
 
g++-4.6 --std=c++0x test.cpp
 
Here's the output:
 
In file included from 
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_algobase.h:65:0,
 from 
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/char_traits.h:41,
 from 
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/string:42,
 from ice.cpp:1:
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_pair.h:
 In constructor âconstexpr std::pair<_T1, _T2>::pair(const std::pair<_U1, 
_U2>&) [with _U1 = std::basic_string, _U2 = int, _T1 = const 
std::basic_string, _T2 = int]â:
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:780:68:
   instantiated from âconst bool 
std::__is_convertible_helper, int>&, 
std::pair, int>, false>::__valueâ
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/type_traits:787:12:
   instantiated from âstd::is_convertible, 
int>&, std::pair, int> >â
test.cpp:8:15:   instantiated from here
/usr/local/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_pair.h:107:43:
 internal compiler error: in build_data_member_initialization, at 
cp/semantics.c:5502
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
 
And here's the output of g++-4.6 -v:
 
Using built-in specs.
COLLECT_GCC=g++-4.6
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../src/configure --program-suffix=-4.6 --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 20101209 (experimental) (GCC)
 
Thanks,
Nate.