public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651
@ 2007-10-18 7:51 brakiozor at caramail dot com
2007-10-18 7:55 ` [Bug c++/33808] " brakiozor at caramail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: brakiozor at caramail dot com @ 2007-10-18 7:51 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
@ 2007-10-18 7:55 ` brakiozor at caramail dot com
2007-10-18 7:56 ` brakiozor at caramail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: brakiozor at caramail dot com @ 2007-10-18 7:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from brakiozor at caramail dot com 2007-10-18 07:55 -------
Created an attachment (id=14368)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14368&action=view)
source code
I was playing a little with template
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
2007-10-18 7:55 ` [Bug c++/33808] " brakiozor at caramail dot com
@ 2007-10-18 7:56 ` brakiozor at caramail dot com
2007-10-18 8:06 ` brakiozor at caramail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: brakiozor at caramail dot com @ 2007-10-18 7:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from brakiozor at caramail dot com 2007-10-18 07:56 -------
Created an attachment (id=14369)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14369&action=view)
.ii file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
2007-10-18 7:55 ` [Bug c++/33808] " brakiozor at caramail dot com
2007-10-18 7:56 ` brakiozor at caramail dot com
@ 2007-10-18 8:06 ` brakiozor at caramail dot com
2007-10-18 8:49 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: brakiozor at caramail dot com @ 2007-10-18 8:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from brakiozor at caramail dot com 2007-10-18 08:06 -------
I found this bug on a more complex program and I did an epurated code.
--
brakiozor at caramail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |brakiozor at caramail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
` (2 preceding siblings ...)
2007-10-18 8:06 ` brakiozor at caramail dot com
@ 2007-10-18 8:49 ` pinskia at gcc dot gnu dot org
2007-10-19 10:06 ` brakiozor at caramail dot com
2007-12-10 1:49 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-10-18 8:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-10-18 08:49 -------
As far as I understand there is no way to encode currently typeof for
templates.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
` (3 preceding siblings ...)
2007-10-18 8:49 ` pinskia at gcc dot gnu dot org
@ 2007-10-19 10:06 ` brakiozor at caramail dot com
2007-12-10 1:49 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: brakiozor at caramail dot com @ 2007-10-19 10:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from brakiozor at caramail dot com 2007-10-19 10:06 -------
yes, one of the way is to pass by an intermediate template type...
(I found it on the web)
but the compiler error could(and should) be fixed
#define TPL_TYPEOF_MUL(A,B) typename typeof_mul<A,B>::type
#define TYPEOF_MUL(A,B) typeof_mul<A,B>::type
template <typename A, typename B>
struct typeof_mul
{
typedef typeof(A()*B()) type;
};
template <class Tx, class Ty>
Y<TPL_TYPEOF_MUL(Tx,Ty)> operator *(X<Tx>& x, const Ty& y)
{
Y<TPL_TYPEOF_MUL(Tx,Ty)> res(x);
//res *= y;
return res;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
` (4 preceding siblings ...)
2007-10-19 10:06 ` brakiozor at caramail dot com
@ 2007-12-10 1:49 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-10 1:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-12-10 01:48 -------
On the trunk we get:
t.cc: In function 'Y<__typeof__ ((Tx() * Ty()))> operator*(X<Tx>&, const Ty&)
[with Tx = double, Ty = double]':
t.cc:29: sorry, unimplemented: mangling typeof, use decltype instead
t.cc: In function 'int main()':
t.cc:47: sorry, unimplemented: mangling typeof, use decltype instead
t.cc:48: sorry, unimplemented: mangling typeof, use decltype instead
t.cc:49: sorry, unimplemented: mangling typeof, use decltype instead
t.cc:51: sorry, unimplemented: mangling typeof, use decltype instead
t.cc:52: sorry, unimplemented: mangling typeof, use decltype instead
t.cc:53: sorry, unimplemented: mangling typeof, use decltype instead
t.cc:54: sorry, unimplemented: mangling typeof, use decltype instead
So this is a dup of bug 11756.
*** This bug has been marked as a duplicate of 11756 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-12-10 1:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-18 7:51 [Bug c++/33808] New: internal compiler error: in write_type, at cp/mangle.c:1651 brakiozor at caramail dot com
2007-10-18 7:55 ` [Bug c++/33808] " brakiozor at caramail dot com
2007-10-18 7:56 ` brakiozor at caramail dot com
2007-10-18 8:06 ` brakiozor at caramail dot com
2007-10-18 8:49 ` pinskia at gcc dot gnu dot org
2007-10-19 10:06 ` brakiozor at caramail dot com
2007-12-10 1:49 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).