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

             Bug #: 53477
           Summary: pretty printer fails with: Python Exception <type
                    'exceptions.IndexError'> list index out of range
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: pl...@agmk.net


Created attachment 27490
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27490
testcase

$ x86_64-gnu-linux-g++ t.cpp -Wall -o t -g2 -gdwarf-4
$ cgdb ./t

in line 15 pretty printer fails with error.

 7│ int main()
 8│ {
 9│         icapSelection_[ /* frame */ 7 ][ /* word */ 3 ].insert( 5 );
10│         icapSelection_[ /* frame */ 7 ][ /* word */ 3 ].insert( 1 );
11│         for ( IcapSelection::const_iterator i = icapSelection_.begin(); i
!= icapSelection_.end(); ++i )
12│         {
13│                 IcapSelection::key_type frame( i->first );
14│                 IcapSelection::mapped_type const& wordBitsetMap( i->second
);
15├───────────────> for ( IcapSelection::mapped_type::const_iterator j =
wordBitsetMap.begin(); j != wordBitsetMap.end(); ++j )
16│                 {
17│                         IcapSelection::mapped_type::key_type word( j->first
);
18│                         IcapSelection::mapped_type::mapped_type const&
bits( j->second );
19│                         for (
IcapSelection::mapped_type::mapped_type::const_iterator k = bits.begin(); k !=
bits.end(); ++k )
20│                         {
21│                                 unsigned bit( *k );
22│                         }
23│                 }
24│         }
25│ }
/home/users/pawels/dvm.git/t.cpp

Breakpoint 1, main () at t.cpp:9
(gdb) n
(gdb)
(gdb) p icapSelection_
$1 = std::map with 1 elements = {
  [7] = std::map with 1 elements = {
    [3] = std::set with 2 elements = {
      [0] = 1,
      [1] = 5
    }
  }
}
(gdb) n
(gdb)
(gdb)
(gdb) p wordBitsetMap
$2 = Python Exception <type 'exceptions.IndexError'> list index out of range:
std::map with 1 elements

Reply via email to