This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19974] incorrect complex division on ia-64 with flag_complex_method = 2
- 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: 16 Feb 2005 12:41:44 -0000
- Subject: [Bug middle-end/19974] incorrect complex division on ia-64 with flag_complex_method = 2
- References: <20050215161817.19974.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-16 12:41 -------
I think I have identified the problem.
The hang itself is probably caused by a Lapack bug, because slarrb is
only fed 0. and NaN as arguments.
The reason why this is so is probably due to a problem in complex
division with flag_complex_method = 2. Here's a test case:
$ cat c-tst.c
#include <stdio.h>
#include <math.h>
#include <complex.h>
int main()
{
float complex a,b,c;
a = 1.e20-I*1.e12;
b = 1. - I*1.e-8;
c = a/b;
printf("%.5g %.5g\n",creal(c),cimag(c));
return 0;
}
This has flag_complex_medhod = 2:
$ gcc -B ~/gcc-C2/gcc c-tst.c
$ ./a.out
1e+20 18059
^^^^^^
wrong
This has flag_complex_method = 1:
$ gcc -B ~/gcc-C1/gcc c-tst.c
$ ./a.out
1e+20 0
^^
correct
Probably a wrong sign when recovering from overflow in the
new complex division routines.
Adding rth to the cc list.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org
OtherBugsDependingO| |18902
nThis| |
Summary|Lapack hang in xeigtstc on |incorrect complex division
|ia-64 |on ia-64 with
| |flag_complex_method = 2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19974