http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46873

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-12-09 17:44:39 
UTC ---
----- original.C -----
#include <map>
#include <string>

void foo()
{
    const std::string s;
    std::map<std::string, std::string>::value_type(s, s);
}
----------------------

Original testcase, it should be valid.

$ g++ -std=gnu++0x original.C 
In file included from
/mnt/svn/gcc-trunk/binary-167621-lto-fortran-checking-yes-rtl-df/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_algobase.h:65:0,
                 from
/mnt/svn/gcc-trunk/binary-167621-lto-fortran-checking-yes-rtl-df/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_tree.h:63,
                 from
/mnt/svn/gcc-trunk/binary-167621-lto-fortran-checking-yes-rtl-df/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/map:60,
                 from original.C:1:
/mnt/svn/gcc-trunk/binary-167621-lto-fortran-checking-yes-rtl-df/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_pair.h:
In constructor 'constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&)
[with _T1 = const std::basic_string<char>, _T2 = std::basic_string<char>]':
original.C:7:53:   instantiated from here
/mnt/svn/gcc-trunk/binary-167621-lto-fortran-checking-yes-rtl-df/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/bits/stl_pair.h:102:35:
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 <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to