A new alpha bug
H.J. Lu
hjl@lucon.org
Fri Sep 12 18:25:00 GMT 1997
>
> > complex_double (double r = 0, double i = 0): re (r), im (i) { }
> [...]
> > complex_double one = 1.0;
>
> I don't think this does what you think it does. What it doesn't
> do is call the constructor listed.
>
> I'll leave it to those who can actually remember what the rules
> concerning that equals sign are to determine if this is a bug in
> the C++ front end or whether your code is wrong.
>
That example is taken from tcomplex.cc in libstdc++/tests.
It looks ok to me.
complex_double one = 1.0;
should be translate by compiler to
complex_double one;
complex_double tmp (1.0);
one = tmp;
That code works on x86. From what I have seen on the egcs list, that
also works on MIPS and Sparc. From what I saw in rtl, I think it may
be a combination of the C++ front end alpha back end.
--
H.J. Lu (hjl@gnu.ai.mit.edu)
More information about the Gcc
mailing list