Hello,
I'm working on Dev-cpp this is the output :
********************************************************************************
Compiler: Default compiler
Building Makefile: "C:\cygwin\tmp\Makefile.win"
Executing make...
make.exe -f "C:\cygwin\tmp\Makefile.win" all
g++.exe -c toto.cc -o toto.o -I"C:/GTK/INCLUDE" -I"C:/GTK/INCLUDE/GTK-2.0"
-I"C:/GTK/INCLUDE/GLIB-2.0" -I"C:/GTK/INCLUDE/PANGO-1.0"
-I"C:/GTK/INCLUDE/ATK-1.0" -I"C:/GTK/INCLUDE/GTKGLEXT-1.0"
-I"C:/GTK/LIB/GTK-2.0/INCLUDE" -I"C:/GTK/LIB/GLIB-2.0/INCLUDE"
-I"C:/GTK/LIB/GTKGLEXT-1.0/INCLUDE" -I"C:/GTK/INCLUDE/LIBGLADE-2.0"
-I"C:/GTK/INCLUDE/LIBXML2" -v -save-temps
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.1.2/configure --with-gcc --with-gnu-ld --with-gnu-as
--host=mingw32 --target=mingw32 --prefix=C:/MinGW --enable-threads
--disable-nls --enable-languages=c,c++ --disable-win32-registry
--disable-shared --enable-fully-dynamic-string --disable-libstdcxx-pch
Thread model: win32
gcc version 4.1.2
c:/dev-cpp/bin/../libexec/gcc/mingw32/4.1.2/cc1plus.exe -E -quiet -v
-IC:/GTK/INCLUDE -IC:/GTK/INCLUDE/GTK-2.0 -IC:/GTK/INCLUDE/GLIB-2.0
-IC:/GTK/INCLUDE/PANGO-1.0 -IC:/GTK/INCLUDE/ATK-1.0
-IC:/GTK/INCLUDE/GTKGLEXT-1.0 -IC:/GTK/LIB/GTK-2.0/INCLUDE
-IC:/GTK/LIB/GLIB-2.0/INCLUDE -IC:/GTK/LIB/GTKGLEXT-1.0/INCLUDE
-IC:/GTK/INCLUDE/LIBGLADE-2.0 -IC:/GTK/INCLUDE/LIBXML2 -iprefix
c:\dev-cpp\bin\../lib/gcc/mingw32/4.1.2/ toto.cc -fpch-preprocess -o toto.ii
ignoring nonexistent directory
"c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../../include/c++/4.1.2"
ignoring nonexistent directory
"c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../../include/c++/4.1.2/mingw32"
ignoring nonexistent directory
"c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../../include/c++/4.1.2/backward"
ignoring nonexistent directory
"c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../../mingw32/include"
ignoring nonexistent directory
"C:/MinGW/lib/gcc/mingw32/../../../include/c++/4.1.2"
ignoring nonexistent directory
"C:/MinGW/lib/gcc/mingw32/../../../include/c++/4.1.2/mingw32"
ignoring nonexistent directory
"C:/MinGW/lib/gcc/mingw32/../../../include/c++/4.1.2/backward"
ignoring nonexistent directory "C:/MinGW/lib/gcc/mingw32/4.1.2/include"
ignoring nonexistent directory
"C:/MinGW/lib/gcc/mingw32/../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
C:/GTK/INCLUDE
C:/GTK/INCLUDE/GTK-2.0
C:/GTK/INCLUDE/GLIB-2.0
C:/GTK/INCLUDE/PANGO-1.0
C:/GTK/INCLUDE/ATK-1.0
C:/GTK/INCLUDE/GTKGLEXT-1.0
C:/GTK/LIB/GTK-2.0/INCLUDE
C:/GTK/LIB/GLIB-2.0/INCLUDE
C:/GTK/LIB/GTKGLEXT-1.0/INCLUDE
C:/GTK/INCLUDE/LIBGLADE-2.0
C:/GTK/INCLUDE/LIBXML2
c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/../../../../include
c:/dev-cpp/bin/../lib/gcc/mingw32/4.1.2/include
C:/MinGW/lib/gcc/mingw32/../../../include
C:/MinGW/include
/mingw/include
End of search list.
c:/dev-cpp/bin/../libexec/gcc/mingw32/4.1.2/cc1plus.exe -fpreprocessed toto.ii
-quiet -dumpbase toto.cc -auxbase-strip toto.o -version -o toto.s
GNU C++ version 4.1.2 (mingw32)
compiled by GNU C version 4.1.2.
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=130982
Compiler executable checksum: 669e873dd1c794b0f5ddbea8fe211782
toto.cc:54: internal compiler error: in write_type, at cp/mangle.c:1651
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make.exe: *** [toto.o] Error 1
Execution terminated
********************************************************************************
the same error occurs on cygwin (v 3.4.4) and on latest ubuntu (v 4.2?)
this is the code:
********************************************************************************
#include <complex>
using namespace std;
template <class T>
class X
{
public:
X() {}
};
template <class T>
class Y
{
public:
template <class U>
Y(const X<U>&) {}
template <class U>
Y& operator *=(const U&) { return *this; }
};
template <class Tx, class Ty>
Y<typeof(Tx()*Ty())> operator *(X<Tx>& x, const Ty& y)
{
Y<typeof(Tx()*Ty())> res(x);
//res *= y;
return res;
}
template <class Tx, class Ty>
Y<typeof(Tx()*Ty())> operator *(const Tx& x, X<Ty>& y)
{
Y<typeof(Tx()*Ty())> res(y);
//res *= x;
return res;
}
int main()
{
double a;
complex<double> b;
X<double> i;
X<complex<double> > j;
i*a;
a*i;
i*b;
b*i;
j*a;
a*j;
j*b;
b*j;
}
********************************************************************************
It's my first bug report, How can I give you the .ii file?
--
Summary: internal compiler error: in write_type, at
cp/mangle.c:1651
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: brakiozor at caramail dot com
GCC build triplet: x86
GCC host triplet: x86
GCC target triplet: x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808