This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19953] [4.0 regression] Special-case real + complex arithmetic operation
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Feb 2005 22:38:15 -0000
- Subject: [Bug middle-end/19953] [4.0 regression] Special-case real + complex arithmetic operation
- References: <20050214155119.19953.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Thomas dot Koenig at online dot de 2005-02-14 22:38 -------
For addition, this is a regression against 3.3.5:
$ cat c-add.c
#include <math.h>
#include <complex.h>
int main()
{
float a;
complex float b,c;
foo(&a,&b);
c = b+a;
return creal(c) + cimag(c) < 0;
}
$ /usr/bin/gcc -S -O3 c-add.c
$ tail -20 c-add.s
call foo
flds -4(%ebp)
flds -8(%ebp)
fxch %st(1)
fadds .LC0
fxch %st(1)
fadds -12(%ebp)
faddp %st, %st(1)
fldz
fucompp
fnstsw %ax
testb $69, %ah
sete %dl
movl %ebp, %esp
popl %ebp
movzbl %dl, %eax
ret
.size main, .-main
.section .note.GNU-stack,"",@progbits
.ident "GCC: (GNU) 3.3.5 (Debian 1:3.3.5-8)"
Note there's only one fldz there, for comparison (which is OK).
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Special-case real + complex |[4.0 regression] Special-
|arithmetic operation |case real + complex
| |arithmetic operation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953