I have passed to compile a little temporary useless C++ code and G++ have written me "Please submit a full bug report", so I do it. ************************************************************************* error description ************************************************************************* 6.cpp:15: internal compiler error: in is_ancestor, at cp/name-lookup.c:2222 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. ************************************************************************* cmdline: ************************************************************************* gpp -S -W -Wextra -g -O2 -v -save-temps 6.cpp >output ************************************************************************* output: ************************************************************************* Using built-in specs. Target: djgpp Configured with: /gnu/gcc-4.10/configure djgpp --prefix=/dev/env/DJDIR --disable-nls --disable-werror --enable-languages=c,c++,fortran,objc,obj-c++,ada Thread model: single gcc version 4.1.0 p:/djgpp/bin/../libexec/gcc/djgpp/4.10/cc1plus.exe -E -quiet -v -iprefix p:/djgpp/bin/../lib/gcc/djgpp/4.10/ -remap -imacros p:/djgpp/bin/../lib/gcc/djgpp/4.10/djgpp.ver 6.cpp -mtune=pentium -W -Wextra -fworking-directory -O2 -fpch-preprocess -o 6.ii ignoring nonexistent directory "p:/djgpp/bin/../lib/gcc/djgpp/4.10/../../../../djgpp/include" ignoring nonexistent directory "p:/djgpp/djgpp/include/" #include "..." search starts here: #include <...> search starts here: p:/djgpp/bin/../lib/gcc/djgpp/4.10/../../../../include/cxx/4.10 p:/djgpp/bin/../lib/gcc/djgpp/4.10/../../../../include/cxx/4.10/djgpp p:/djgpp/bin/../lib/gcc/djgpp/4.10/../../../../include/cxx/4.10/backward p:/djgpp/bin/../lib/gcc/djgpp/4.10/include p:/djgpp/include/cxx/4.10/ p:/djgpp/include/cxx/4.10/djgpp/ p:/djgpp/include/cxx/4.10/backward/ p:/djgpp/lib/gcc/djgpp/4.10/include/ p:/djgpp/include/ End of search list. p:/djgpp/bin/../libexec/gcc/djgpp/4.10/cc1plus.exe -fpreprocessed 6.ii -quiet -dumpbase 6.cpp -mtune=pentium -auxbase 6 -g -O2 -W -Wextra -version -o 6.s GNU C++ version 4.1.0 (djgpp) compiled by GNU C version 4.1.0. GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 25d99bb4bc1ed4eaee3f5ab2997c0cc8 6.cpp:15: internal compiler error: in is_ancestor, at cp/name-lookup.c:2222 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. ************************************************************************* 6.cpp: ************************************************************************* #define heap template<class T> struct User_wrapper { User_wrapper(T heap *const); }; struct X { static User_wrapper<X> test(X heap* ptr); }; template<class T> User_wrapper<T> T::test(T heap* ptr) { return User_wrapper<T>(ptr); } int main() { } ************************************************************************* 6.ii: ************************************************************************* # 1 "6.cpp" # 1 "p:/prj/educh/os/lib/#data/test/v4//" # 1 "<built-in>" # 1 "<command line>" # 1 "p:/djgpp/bin/../lib/gcc/djgpp/4.10/djgpp.ver" 1 # 1 "p:/djgpp/include/sys/version.h" 1 3 4 # 2 "p:/djgpp/bin/../lib/gcc/djgpp/4.10/djgpp.ver" 2 # 1 "<command line>" 2 # 1 "6.cpp" template<class T> struct User_wrapper { User_wrapper(T *const); }; struct X { static User_wrapper<X> test(X * ptr); }; template<class T> User_wrapper<T> T::test(T * ptr) { return User_wrapper<T>(ptr); } int main() { } ************************************************************************* 6.S: ************************************************************************* .file "6.cpp" .section .debug_abbrev,"" Ldebug_abbrev0: .section .debug_info,"" Ldebug_info0: .section .debug_line,"" Ldebug_line0: .section .text Ltext0:
*** This bug has been marked as a duplicate of 27102 ***