GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
Bug 16813 - compiler error in DEBUG version of range insertion std::map::insert
Summary: compiler error in DEBUG version of range insertion std::map::insert
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 3.4.2
Assignee: Paolo Carlini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-29 00:02 UTC by Matt Austern
Modified: 2004-07-29 12:10 UTC (History)
1 user (show)

See Also:
Host: powerpc-apple-darwin7.4.0/
Target: powerpc-apple-darwin7.4.0/
Build: powerpc-apple-darwin7.4.0/
Known to work:
Known to fail:
Last reconfirmed: 2004-07-29 00:06:59


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Austern 2004-07-29 00:02:51 UTC
Compiling the following test case
#define _GLIBCXX_DEBUG

#include <map>

int
main( int argc, char * argv[ ] ) {
  std::map< int, float > m1, m2;

  m1[ 3 ] = 3.0f;
  m1[ 11 ] = -67.0f;

  m2.insert( m1.begin( ), m1.end( ) );

  return 0;
}

Gives this error:
[tmp]$ /work/root.fsf/bin/g++ -c foo.cc
/Volumes/Data/work/root.fsf/bin/../lib/gcc/powerpc-apple-darwin7.4.0/3.5.0/../../../../include/
c++/3.5.0/debug/map.h: In member function `void __gnu_debug_def::map<_Key, _Tp, _Compare, 
_Allocator>::insert(_InputIterator, _InputIterator) [with _InputIterator = __gnu_debug::
_Safe_iterator<std::_Rb_tree_iterator<std::pair<const int, float> >, __gnu_debug_def::map<int, float, 
std::less<int>, std::allocator<std::pair<const int, float> > > >, _Key = int, _Tp = float, _Compare = 
std::less<int>, _Allocator = std::allocator<std::pair<const int, float> >]':
foo.cc:12:   instantiated from here
/Volumes/Data/work/root.fsf/bin/../lib/gcc/powerpc-apple-darwin7.4.0/3.5.0/../../../../include/
c++/3.5.0/debug/map.h:166: error: `__glibcxx_valid_range' was not declared in this scope
Comment 1 Andrew Pinski 2004-07-29 00:06:59 UTC
Confirmed.
Comment 2 Paolo Carlini 2004-07-29 09:51:46 UTC
Just a trivial typo: __glibcxx_valid_range for __glibcxx_check_valid_range. I'm
fixing it everywhere.
Comment 3 CVS Commits 2004-07-29 10:52:56 UTC
Subject: Bug 16813

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	paolo@gcc.gnu.org	2004-07-29 10:52:49

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/debug: map.h 
Added files:
	libstdc++-v3/testsuite/23_containers/map/insert: 16813.cc 

Log message:
	2004-07-29  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/16813
	* include/debug/map.h (insert(_InputIterator, _InputIterator)):
	Fix typo.
	* testsuite/23_containers/map/insert/16813.cc: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2589&r2=1.2590
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/debug/map.h.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/map/insert/16813.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 4 CVS Commits 2004-07-29 12:08:23 UTC
Subject: Bug 16813

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	paolo@gcc.gnu.org	2004-07-29 12:08:04

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/include/debug: map.h 
Added files:
	libstdc++-v3/testsuite/23_containers/map/insert: 16813.cc 

Log message:
	2004-07-29  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/16813
	* include/debug/map.h (insert(_InputIterator, _InputIterator)):
	Fix typo.
	* testsuite/23_containers/map/insert/16813.cc: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.148&r2=1.2224.2.149
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/debug/map.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2.8.1&r2=1.2.8.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/23_containers/map/insert/16813.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1

Comment 5 Paolo Carlini 2004-07-29 12:10:05 UTC
Fixed for mainline and 3.4.2.