Hello ! AS intructed by g++ itself, I'm sending you a bug report. I tried to reduce the source file to the smallest file which triggers the bug.
Maybe one can make shorter but at least this file contains no '#include' directive. Session transcript: ----------------------------------------------------------------------------------------- > g++ try.cpp try.cpp: In function ‘int main()’: try.cpp:19: internal compiler error: in write_type, at cp/mangle.c:1648 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>. ----------------------------------------------------------------------------------------- > g++ -v -save-temps try.cpp Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libmudflap --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.2.3 (Debian 4.2.3-1) /usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus -E -quiet -v -D_GNU_SOURCE try.cpp -mtune=generic -fpch-preprocess -o try.ii ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/include" ignoring nonexistent directory "/usr/include/i486-linux-gnu" #include "..." search starts here: #include <...> search starts here: /usr/include/c++/4.2 /usr/include/c++/4.2/i486-linux-gnu /usr/include/c++/4.2/backward /usr/local/include /usr/lib/gcc/i486-linux-gnu/4.2.3/include /usr/include End of search list. /usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus -fpreprocessed try.ii -quiet -dumpbase try.cpp -mtune=generic -auxbase try -version -o try.s GNU C++ version 4.2.3 (Debian 4.2.3-1) (i486-linux-gnu) compiled by GNU C version 4.2.3 (Debian 4.2.3-1). GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64475 Compiler executable checksum: 8fbfc380da4647f28b9a8438f8bc8739 try.cpp: In function ‘int main()’: try.cpp:19: internal compiler error: in write_type, at cp/mangle.c:1648 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>. ----------------------------------------------------------------------------------------- In the hope it can be useful. Sincerely yours. -- Philippe Hoogvorst TELECOM ParisTech 46, rue Barrault 75634 Paris CEDEX 13 France Tél: (+33) 1 45 81 77 24 Fax: (+33) 1 45 80 40 36 -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.2.2 (GNU/Linux) mQELBEPfSTsBCACg+rb6COOcVVEsxKYayBhOLoTvS25dHZ29Sgb11oq/94faDj3L YrYD6Fs5M29E9+c8rribjRmr/qIdS08xPrDVBPG3yziGlRqFs1xr32BSMbQfYk3B MX8iLBmBhRGKx9NsBoYC7hnjG9Q+cQCDmP6P6+sahArFEJY3Gwkog3xGALJO83e3 9J30qN7bc9D9HnoTo7vE9336r2ZI053IhH127AS29LZZOennUx7sPtqjINCjWo5t 8Em/min4i8xpWtf6qvsx/Niz8y8Kb60Kaam+YDruuKcuzGlALbkDqOENhR5983vW LkGjS06BnXK8e+4hFuKphs9oo4A/wfDIhfR3AAYptC9QaGlsaXBwZSBIb29ndm9y c3QgPHBoaWxpcHBlLmhvb2d2b3JzdEBlbnN0LmZyPokBNAQTAQIAHgUCQ99JOwIb AwYLCQgHAwIDFQIDAxYCAQIeAQIXgAAKCRAJckf+mdZyUw3AB/4uYXF08fp0HiS7 +LkCXDo/WWEGKZyqTJ87bUcjNZ04DiLoSzl75YJs4b6xRmSYex17wayNTSOPYKhd bgW8BvDbO7iLXXBSlm086Vs1BIStW9VzjM8R02gSIQANgV1NQReNuOZpFV2KdUFf xHl0oTsWFoKWqYdTXgMnH/sRprhxy0mRh/d5xlg1tDq5MMI1JvsFAUWXcv4uUagi Xtn5on9cLzJhmO9Tq+S1nFd6DBx4RX3ygit4KrxnxGmVmecyor1X38lE+sYZ9i0A ylNTT9BfpBBUkEJZNTzmyaL66M5hAhmgBprti5ArT/Yj7mcu6k3JH3kMp6HCy3UP ckQAW2z2 =wOfR -----END PGP PUBLIC KEY BLOCK-----
template <class T> T makeT() ; template<class TA , class TB > typeof( makeT<TA>()+makeT<TB>()) makeTT() ; template <class T> struct vector { vector( ) ; void operator=( const vector<T> &); template<typename TA , typename TB> friend vector<typeof(makeTT<TA,TB>())> operator + (const vector<TA> &, const vector<TB> &) ; }; int main() { vector<double> Ta , Tb , Tr ; Tr = Ta + Tb ; }
# 1 "try.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "try.cpp" template <class T> T makeT() ; template<class TA , class TB > typeof( makeT<TA>()+makeT<TB>()) makeTT() ; template <class T> struct vector { vector( ) ; void operator=( const vector<T> &); template<typename TA , typename TB> friend vector<typeof(makeTT<TA,TB>())> operator + (const vector<TA> &, const vector<TB> &) ; }; int main() { vector<double> Ta , Tb , Tr ; Tr = Ta + Tb ; }
.file "try.cpp"
signature.asc
Description: OpenPGP digital signature