Package: g++-4.3 Version: 4.3.0-5 Severity: normal *** Please type your report below this line *** I've found a problem with g++-4.3 (also tested with current snapshot package), I'll describe it using this testing source code:
[CODE STARTS] file bug.cc class BUG { public: bool name() { return true; } }; template <bool T> struct BUG1_5 { }; template <bool name> class BUG2 : BUG { public: typedef BUG1_5<name> ptr; }; int main() { BUG2<false> b; return 0; } [CODE ENDS] Compiling with "g++ -save-temps bug.cc -o bug" causes: [OUTPUT STARTS] bug.cc:17: internal compiler error: Naruszenie ochrony pamięci Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions. [OUTPUT ENDS] (`Naruszenie ochrony pamięci' means `Segmentation fault') Crash appears when there is class template with same parameter name as parent's function and same parameter type as that function's return type and then we e.g. typedef some with this parameter. There are also problems when template parameter has same name as parent's function (but different parameter type), but they don't crash. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.25-2-amd64 (SMP w/1 CPU core) Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages g++-4.3 depends on: ii gcc-4.3 4.3.0-5 The GNU C compiler ii gcc-4.3-base 4.3.0-5 The GNU Compiler Collection (base ii libc6 2.7-12 GNU C Library: Shared libraries ii libgmp3c2 2:4.2.2+dfsg-3 Multiprecision arithmetic library ii libmpfr1ldbl 2.3.1.dfsg.1-2 multiple precision floating-point ii libstdc++6-4.3-dev 4.3.0-5 The GNU Standard C++ Library v3 (d g++-4.3 recommends no packages. -- no debconf information