This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/14648] New: hash_maps are broken (regression)


hash_maps no longer work. This is a regression with respect to gcc 3.4.0 built 
last week. 
 
Consider the following code: 
 
source code th.C 
 
#include <ext/hash_map> 
#include <ext/rope> 
 
using namespace std; 
using namespace __gnu_cxx; 
 
int hmap1_test(int, char**) 
{ 
  typedef hash_map<char, crope, hash<char>, equal_to<char> > maptype; 
  maptype m; 
  m['l'] = "50"; 
  cout << "m['x'] = " << m['x'] << endl; 
  return 0; 
}  
 
g++ -v -W -Wall th.C 
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs 
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c
++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug 
Thread model: posix 
gcc version 3.4.0 20040319 (prerelease) 
 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -quiet -v -D_GNU_SOURCE 
th.C -quiet -dumpbase th.C -mtune=pentiumpro -auxbase th -W -Wall -version -o /
tmp/ccAyVpeT.s 
ignoring nonexistent directory "NONE/include" 
ignoring nonexistent directory "/usr/local/lib/gcc/
i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
i686-pc-linux-gnu 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
backward 
 /usr/local/include 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include 
 /usr/include 
End of search list. 
GNU C++ version 3.4.0 20040319 (prerelease) (i686-pc-linux-gnu) 
	compiled by GNU C version 3.4.0 20040319 (prerelease). 
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
ropeimpl.h: In static member function `static bool __gnu_cxx::rope<_CharT, 
_Alloc>::_S_apply_to_pieces(__gnu_cxx::_Rope_char_consumer<_CharT>&, const 
__gnu_cxx::_Rope_RopeRep<_CharT, _Alloc>*, size_t, size_t) [with _CharT = char, 
_Alloc = std::allocator<char>]': 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
rope:1314:   instantiated from `void __gnu_cxx::rope<_CharT, 
_Alloc>::apply_to_pieces(size_t, size_t, 
__gnu_cxx::_Rope_char_consumer<_CharT>&) const [with _CharT = char, _Alloc = 
std::allocator<char>]' 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
ropeimpl.h:930:   instantiated from `std::basic_ostream<_CharT, _Traits>& 
__gnu_cxx::operator<<(std::basic_ostream<_CharT, _Traits>&, const 
__gnu_cxx::rope<_CharT, _Alloc>&) [with _CharT = char, _Traits = 
std::char_traits<char>, _Alloc = std::allocator<char>]' 
th.C:13:   instantiated from here 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
ropeimpl.h:877: error: cannot call member function `_Tp* 
__gnu_cxx::new_allocator<_Tp>::allocate(size_t, const void*) [with _Tp = char]' 
without object 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
rope:1314:   instantiated from `void __gnu_cxx::rope<_CharT, 
_Alloc>::apply_to_pieces(size_t, size_t, 
__gnu_cxx::_Rope_char_consumer<_CharT>&) const [with _CharT = char, _Alloc = 
std::allocator<char>]' 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
ropeimpl.h:930:   instantiated from `std::basic_ostream<_CharT, _Traits>& 
__gnu_cxx::operator<<(std::basic_ostream<_CharT, _Traits>&, const 
__gnu_cxx::rope<_CharT, _Alloc>&) [with _CharT = char, _Traits = 
std::char_traits<char>, _Alloc = std::allocator<char>]' 
th.C:13:   instantiated from here 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
ropeimpl.h:881: error: cannot call member function `void 
__gnu_cxx::new_allocator<_Tp>::deallocate(_Tp*, size_t) [with _Tp = char]' 
without object 
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/ext/
ropeimpl.h:885: error: cannot call member function `void 
__gnu_cxx::new_allocator<_Tp>::deallocate(_Tp*, size_t) [with _Tp = char]' 
without object

-- 
           Summary: hash_maps are broken (regression)
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schmid at snake dot iap dot physik dot tu-darmstadt dot
                    de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]