This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/27390] [4.2 Regression] gcc.target/x86_64/abi/test_complex_returning.c execution fails at -O0
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2006 07:24:50 -0000
- Subject: [Bug target/27390] [4.2 Regression] gcc.target/x86_64/abi/test_complex_returning.c execution fails at -O0
- References: <bug-27390-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from bonzini at gnu dot org 2006-05-29 07:24 -------
The problem is that regstack is wrong when it comes to handling
COMPLEX_FLOAT_MODEs.
To handle clobbers, it calls move_nan_to_stack_reg twice on the same insn. But
the second call does *not* add a new insn, so we get only one flds instead of
two.
There is also something wrong in emit_pop_insn of a complex float, because if
we fix the above we get a
flds .LC0
flds .LC0
fstp %st
fstp %st(1)
which is still wrong: we should have two fstps to %st.
The solution is probably to emit two distinct clobbers with XFmode instead of
one with a complex mode.
Paolo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27390