[Bug middle-end/18882] [3.3/3.4 Regression] wrong results with complex long double
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Wed Dec 8 16:29:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-12-08 16:29 -------
Here's my shortest version:
-------------------
extern "C" void abort ();
struct C {
__complex__ long double c;
};
int main() {
C x = {2+2i};
int n = 1;
C y = (n==1) ? x : (C){3+3i};
if (__imag__ y.c != 2)
abort ();
}
----------------------
This fails on 3.3 and 3.4 branches:
g/x> /home/bangerth/bin/gcc-3.2*/bin/c++ x.cc ; ./a.out
g/x> /home/bangerth/bin/gcc-3.3*/bin/c++ x.cc ; ./a.out
Aborted
g/x> /home/bangerth/bin/gcc-3.4*/bin/c++ x.cc ; ./a.out
Aborted
g/x> /home/bangerth/bin/gcc-4*/bin/c++ x.cc ; ./a.out
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.3/3.4 Regression] wrong |[3.3/3.4 Regression] wrong
|results of pow( complex<long|results with complex long
|double>(2, 1), odd integer )|double
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18882
More information about the Gcc-bugs
mailing list