This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C/C++] obscure ICEs with __complex__ on Solaris
- To: gcc-patches at egcs dot cygnus dot com
- Subject: [C/C++] obscure ICEs with __complex__ on Solaris
- From: Gabriel Dos_Reis <Gabriel dot Dos_Reis at sophia dot inria dot fr>
- Date: 27 Jul 1999 22:43:28 +0200
- Organization: I.N.R.I.A Sophia-Antipolis (France)
Well, these took me two days to track :-(
While cleaning libstdc++-v3/bits/std_complex.h, I found the following
craches the compiler (current CVS):
poivre% cat /tmp/1.C
struct gnu_double_complex {
__complex__ double v;
gnu_double_complex(double, double);
};
gnu_double_complex::gnu_double_complex(double r, double i)
{
__real__ v = r;
__imag__ v = i;
}
int main()
{
gnu_double_complex z(9, 7);
gnu_double_complex w = z;
}
poivre% ~/EGCS/bin/g++ -O 1.C
1.C: In function `int main()':
1.C:16: Internal compiler error.
1.C:16: Please submit a full bug report.
1.C:16: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for instructions.
[ Lovely message; isn't it? ;-) ]
But it does *compile* fine, without optimization.
Next I tried:
poivre% cat 2.c
struct X {
__complex__ double v;
};
int main()
{
__complex__ double z;
struct X x;
x.v = z;
}
poivre% ~/EGCS/bin/gcc -O 2.c
2.c: In function `main':
2.c:9: Internal compiler error in `change_address', at emit-rtl.c:1580
Please submit a full bug report.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for instructions.
Seems like a problem common to the two front-ends.
-- Gaby