[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#176101: g++-3.2: broken c++ code causes g++-3.2 and older to segfault

Subject: g++-3.2: broken c++ code causes g++-3.2 and older to segfault
Package: g++-3.2
Version: 1:3.2.2-0pre3
Severity: normal
Tags: upstream

The following (broken!) code causes the g++-3.2 to segfault. The behaviour
happens with older versions of the gcc too.

template<typename T1>
class map
  typedef T1 iterator;

template<typename T3>
class A
  typedef map<T3> B;
  void f()
    typename B::iterator<T3> it;

compiling it with:
> g++-3.2 -c gccbug.cpp
results in 
gccbug.cpp:10: warning: all member functions in class `A<T3>' are private
gccbug.cpp: In member function `void A<T3>::f()':
gccbug.cpp:14: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux massive 2.4.19 #1 Mon Okt 14 21:32:57 CEST 2002 i686
Locale: LANG=en, LC_CTYPE=de_DE@euro

Versions of packages g++-3.2 depends on:
ii  gcc-3.2                    1:3.2.2-0pre3 The GNU C compiler
ii  gcc-3.2-base               1:3.2.2-0pre3 The GNU Compiler Collection (base 
ii  libc6                      2.3.1-9       GNU C Library: Shared libraries 
ii  libstdc++5-dev             1:3.2.2-0pre3 The GNU stdc++ library version 3 

-- no debconf information

Reply to: