public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/18902] New: Naive (default) complex division algorithm
@ 2004-12-09 11:08 pcarlini at suse dot de
  2004-12-09 11:09 ` [Bug middle-end/18902] " pcarlini at suse dot de
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-09 11:08 UTC (permalink / raw)
  To: gcc-bugs

Apparently, the default algorithm (the other one available is selectable via
flag_complex_divide_method = 1) is the naive one, which is not able to deal
correctly with "large" denominators. For some additional details, see:

  http://gcc.gnu.org/ml/gcc-bugs/2004-12/msg00820.html

I'm attaching a trivial, pure C, testcase, showing at least inconsistency in the
behaviors for real vs complex types. Swithing to flag_complex_divide_method = 1
fixes simple testcases, but maybe we really want the full C99-conforming algo,
as sketched in Annex G. In that case this would be a (high priority ;) request
for enhancement.

-- 
           Summary: Naive (default) complex division algorithm
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de
                CC: bkoz at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org,gdr at integrable-solutions dot net
 GCC build triplet: Any
  GCC host triplet: Any
GCC target triplet: Any


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
@ 2004-12-09 11:09 ` pcarlini at suse dot de
  2004-12-09 11:17 ` joseph at codesourcery dot com
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-09 11:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-09 11:09 -------
Created an attachment (id=7712)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7712&action=view)
A trivial testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
  2004-12-09 11:09 ` [Bug middle-end/18902] " pcarlini at suse dot de
@ 2004-12-09 11:17 ` joseph at codesourcery dot com
  2004-12-09 11:26 ` pcarlini at suse dot de
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: joseph at codesourcery dot com @ 2004-12-09 11:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2004-12-09 11:17 -------
Subject: Re:  New: Naive (default) complex division
 algorithm

On Thu, 9 Dec 2004, pcarlini at suse dot de wrote:

> I'm attaching a trivial, pure C, testcase, showing at least inconsistency in the
> behaviors for real vs complex types. Swithing to flag_complex_divide_method = 1
> fixes simple testcases, but maybe we really want the full C99-conforming algo,
> as sketched in Annex G. In that case this would be a (high priority ;) request
> for enhancement.

The Annex G example still comes with a warning that it may yield undue 
overflow: it illustrates how to get the treatment of infinities expected 
in that informative Annex, not how to avoid excess overflow in general.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
  2004-12-09 11:09 ` [Bug middle-end/18902] " pcarlini at suse dot de
  2004-12-09 11:17 ` joseph at codesourcery dot com
@ 2004-12-09 11:26 ` pcarlini at suse dot de
  2004-12-09 11:33 ` pcarlini at suse dot de
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-09 11:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-09 11:26 -------
> The Annex G example still comes with a warning that it may yield undue 
> overflow: it illustrates how to get the treatment of infinities expected 
> in that informative Annex, not how to avoid excess overflow in general.

I see, probably I should have pointed out that I'm reading in detail Annex G
for the first time, and I'm not a floating point expert. Nvertheless, in the
light of some basic notions of numerical analysis, seems rather obvious to me
that "we have a problem" which, moreover, nobody apparently discusses in detail.
Which is your take on the issue, more generally?

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (2 preceding siblings ...)
  2004-12-09 11:26 ` pcarlini at suse dot de
@ 2004-12-09 11:33 ` pcarlini at suse dot de
  2004-12-09 11:46 ` joseph at codesourcery dot com
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-09 11:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-09 11:33 -------
A naive idea: would make sense swithing from flag_complex_divide_method == 0
to flag_complex_divide_method == 1 basing on -ffast-math or other, finer grained,
floating point, switch?!?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joseph at codesourcery dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (3 preceding siblings ...)
  2004-12-09 11:33 ` pcarlini at suse dot de
@ 2004-12-09 11:46 ` joseph at codesourcery dot com
  2004-12-09 13:02 ` pcarlini at suse dot de
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: joseph at codesourcery dot com @ 2004-12-09 11:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2004-12-09 11:46 -------
Subject: Re:  Naive (default) complex division algorithm

On Thu, 9 Dec 2004, pcarlini at suse dot de wrote:

> A naive idea: would make sense swithing from flag_complex_divide_method == 0
> to flag_complex_divide_method == 1 basing on -ffast-math or other, finer grained,
> floating point, switch?!?

I'd suggest naming the switch -fcx-limited-range (including in 
-ffast-math).  With due warning in the documentation that even the better 
algorithm currently implemented doesn't avoid all excess overflow.  Given 
that C99 does expect something better than the naive algorithm it might 
still make sense to switch to the better algorithm we have as the default 
(with this flag to control it, and in future hopefully the 
CX_LIMITED_RANGE pragma) for C.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (4 preceding siblings ...)
  2004-12-09 11:46 ` joseph at codesourcery dot com
@ 2004-12-09 13:02 ` pcarlini at suse dot de
  2004-12-09 13:25 ` joseph at codesourcery dot com
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-09 13:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-09 13:01 -------
Thanks Joseph. I will try to come up with a patch as soon as possible, but
please be gentle while reviewing it, would be my first one for the compiler
proper ;)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-09 13:01:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (5 preceding siblings ...)
  2004-12-09 13:02 ` pcarlini at suse dot de
@ 2004-12-09 13:25 ` joseph at codesourcery dot com
  2004-12-09 13:32 ` pcarlini at suse dot de
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: joseph at codesourcery dot com @ 2004-12-09 13:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2004-12-09 13:25 -------
Subject: Re:  Naive (default) complex division algorithm

On Thu, 9 Dec 2004, pcarlini at suse dot de wrote:

> Thanks Joseph. I will try to come up with a patch as soon as possible, but

There is no regression here, so I recommend holding off until 4.0 has 
branched.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (6 preceding siblings ...)
  2004-12-09 13:25 ` joseph at codesourcery dot com
@ 2004-12-09 13:32 ` pcarlini at suse dot de
  2004-12-09 16:04 ` gdr at integrable-solutions dot net
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-09 13:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-09 13:31 -------
> There is no regression here, so I recommend holding off until 4.0 has 
> branched.

Definitely. Thanks again.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (7 preceding siblings ...)
  2004-12-09 13:32 ` pcarlini at suse dot de
@ 2004-12-09 16:04 ` gdr at integrable-solutions dot net
  2004-12-23 23:05 ` bangerth at dealii dot org
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-12-09 16:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-12-09 16:03 -------
Subject: Re:  Naive (default) complex division algorithm

"joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| ------- Additional Comments From joseph at codesourcery dot com  2004-12-09 11:46 -------
| Subject: Re:  Naive (default) complex division algorithm
| 
| On Thu, 9 Dec 2004, pcarlini at suse dot de wrote:
| 
| > A naive idea: would make sense swithing from flag_complex_divide_method == 0
| > to flag_complex_divide_method == 1 basing on -ffast-math or other, finer grained,
| > floating point, switch?!?
| 
| I'd suggest naming the switch -fcx-limited-range (including in 
| -ffast-math).  With due warning in the documentation that even the better 
| algorithm currently implemented doesn't avoid all excess overflow.  Given 

I suppose you don't mean a warning each time that flag is used, but
rather a note in our documentation.

| that C99 does expect something better than the naive algorithm it might 
| still make sense to switch to the better algorithm we have as the default 
| (with this flag to control it, and in future hopefully the 
| CX_LIMITED_RANGE pragma) for C.

I strongly support the idea that the non-grammar school algorithm
should be the default.

-- Gaby


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (8 preceding siblings ...)
  2004-12-09 16:04 ` gdr at integrable-solutions dot net
@ 2004-12-23 23:05 ` bangerth at dealii dot org
  2004-12-23 23:22 ` pcarlini at suse dot de
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: bangerth at dealii dot org @ 2004-12-23 23:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-12-23 23:05 -------
A special case of what is covered in this PR is PR 19138. 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (9 preceding siblings ...)
  2004-12-23 23:05 ` bangerth at dealii dot org
@ 2004-12-23 23:22 ` pcarlini at suse dot de
  2005-01-20 10:45 ` Thomas dot Koenig at online dot de
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2004-12-23 23:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-12-23 23:22 -------
*** Bug 19138 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitri at unm dot edu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (10 preceding siblings ...)
  2004-12-23 23:22 ` pcarlini at suse dot de
@ 2005-01-20 10:45 ` Thomas dot Koenig at online dot de
  2005-01-20 11:50 ` pcarlini at suse dot de
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-20 10:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-01-20 10:45 -------
For gfortran, this is a regression against g77.
See this test program:

$ cat complex-scale.f
      program main
      implicit none
      complex ca,cb,cc
      data ca /(+2.3955909e+19,-1.2258349e-38)/
      data cb /(+0.0000000e+00,-1.7649423e+19)/
      cc = ca/cb
      print *,cc
      print *,-real(ca)/aimag(cb)
      end
$ gfortran complex-scale.f
$ ./a.out
 (  0.000000    ,     +Infinity)
   1.357320
$ g77 complex-scale.f
$ ./a.out
 (0.,1.35731959)
  1.35731959


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (11 preceding siblings ...)
  2005-01-20 10:45 ` Thomas dot Koenig at online dot de
@ 2005-01-20 11:50 ` pcarlini at suse dot de
  2005-01-20 12:11 ` pcarlini at suse dot de
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2005-01-20 11:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-01-20 11:50 -------
Hi Thomas, can you possibly figure out from the ChangeLog the author of the
algorithm with scaling, which currently seems broken, and add him in CC? We
want to fix it, in the first place.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (12 preceding siblings ...)
  2005-01-20 11:50 ` pcarlini at suse dot de
@ 2005-01-20 12:11 ` pcarlini at suse dot de
  2005-01-21 20:23 ` toon at moene dot indiv dot nluug dot nl
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2005-01-20 12:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-01-20 12:10 -------
A first implementation of the algorithm was already in 3_4, under the name
expand_cmplxdiv_wide (in optabs.cc), then Rth rewrote it in the tree-ssa branch
as part of the new tree-complex.cc (It would be mildly interesting to see if
the version in 3_4 works) In the meanwhile, I'm adding Rth in CC of 19486.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [Bug middle-end/18902] Naive (default) complex division algorithm
       [not found] ` <18548577.1106258230876.JavaMail.root@dtm1eusosrv72.dtm.ops.eu.uu.net>
@ 2005-01-21 20:23   ` Toon Moene
  0 siblings, 0 replies; 27+ messages in thread
From: Toon Moene @ 2005-01-21 20:23 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

pcarlini at suse dot de wrote:

> ------- Additional Comments From pcarlini at suse dot de  2005-01-20 12:10 -------
> A first implementation of the algorithm was already in 3_4, under the name
> expand_cmplxdiv_wide (in optabs.cc), then Rth rewrote it in the tree-ssa branch
> as part of the new tree-complex.cc (It would be mildly interesting to see if
> the version in 3_4 works) In the meanwhile, I'm adding Rth in CC of 19486.

Indeed (ChangeLog.1):

Tue May 18 03:53:37 1999  Craig Burley  <craig@jcb-sc.com>

         Improve open-coding of complex divide:
         * flags.h: Declare new front-end-malleable flag.
         * toplev.c: Define new flag.
         * optabs.c (expand_cmplxdiv_straight): New function to do original
         open-coding.
         (expand_cmplxdiv_wide): New function to do new open-coding,
         from Toon Moene, with changes (call to emit_barrier, dropping
         of spurious `ok = 1;', plus the obvious `break;' -> `return 0;').
         (expand_binop): A bit of spacing fixing, while at it.
         Use new functions instead of inlining the open-coding code.

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (13 preceding siblings ...)
  2005-01-20 12:11 ` pcarlini at suse dot de
@ 2005-01-21 20:23 ` toon at moene dot indiv dot nluug dot nl
       [not found] ` <18548577.1106258230876.JavaMail.root@dtm1eusosrv72.dtm.ops.eu.uu.net>
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: toon at moene dot indiv dot nluug dot nl @ 2005-01-21 20:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From toon at moene dot indiv dot nluug dot nl  2005-01-21 20:23 -------
Subject: Re:  Naive (default) complex division algorithm

pcarlini at suse dot de wrote:

> ------- Additional Comments From pcarlini at suse dot de  2005-01-20 12:10 -------
> A first implementation of the algorithm was already in 3_4, under the name
> expand_cmplxdiv_wide (in optabs.cc), then Rth rewrote it in the tree-ssa branch
> as part of the new tree-complex.cc (It would be mildly interesting to see if
> the version in 3_4 works) In the meanwhile, I'm adding Rth in CC of 19486.

Indeed (ChangeLog.1):

Tue May 18 03:53:37 1999  Craig Burley  <craig@jcb-sc.com>

         Improve open-coding of complex divide:
         * flags.h: Declare new front-end-malleable flag.
         * toplev.c: Define new flag.
         * optabs.c (expand_cmplxdiv_straight): New function to do original
         open-coding.
         (expand_cmplxdiv_wide): New function to do new open-coding,
         from Toon Moene, with changes (call to emit_barrier, dropping
         of spurious `ok = 1;', plus the obvious `break;' -> `return 0;').
         (expand_binop): A bit of spacing fixing, while at it.
         Use new functions instead of inlining the open-coding code.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (15 preceding siblings ...)
       [not found] ` <18548577.1106258230876.JavaMail.root@dtm1eusosrv72.dtm.ops.eu.uu.net>
@ 2005-01-24  2:32 ` rth at gcc dot gnu dot org
  2005-01-25 18:26 ` rth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-01-24  2:32 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18902 depends on bug 19486, which changed state.

Bug 19486 Summary: flags_complex_divide_method=1 doesn't work
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19486

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (16 preceding siblings ...)
  2005-01-24  2:32 ` rth at gcc dot gnu dot org
@ 2005-01-25 18:26 ` rth at gcc dot gnu dot org
  2005-01-26  9:32 ` Thomas dot Koenig at online dot de
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-01-25 18:26 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18902 depends on bug 19609, which changed state.

Bug 19609 Summary: [4.0 Regression] real and imaginary part interchanged when flags_complex_divide_method=1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19609

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (17 preceding siblings ...)
  2005-01-25 18:26 ` rth at gcc dot gnu dot org
@ 2005-01-26  9:32 ` Thomas dot Koenig at online dot de
  2005-01-26 10:54 ` pcarlini at suse dot de
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-26  9:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-01-26 09:32 -------
The recent fixes in complex handling, and the
scaled division algorithm, have eliminated the
Lapack regressions with -O0 at least on ia64-unknown-linux-gnu
(see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5900#c23 ).

This is a huge step.  I think PR 18902 should now be considered
critical, at least for gfortran.

        Thomas

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (18 preceding siblings ...)
  2005-01-26  9:32 ` Thomas dot Koenig at online dot de
@ 2005-01-26 10:54 ` pcarlini at suse dot de
  2005-02-02 12:54 ` pcarlini at suse dot de
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2005-01-26 10:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-01-26 10:54 -------
> This is a huge step.  I think PR 18902 should now be considered
> critical, at least for gfortran.

Ok, I'll start on it immediately (after all, it's rather straightforward, now).
Then the maintainers will decide...



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (19 preceding siblings ...)
  2005-01-26 10:54 ` pcarlini at suse dot de
@ 2005-02-02 12:54 ` pcarlini at suse dot de
  2005-02-24 14:23 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: pcarlini at suse dot de @ 2005-02-02 12:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2005-02-02 12:54 -------
Rth is actively working on these issues.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pcarlini at suse dot de     |rth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (20 preceding siblings ...)
  2005-02-02 12:54 ` pcarlini at suse dot de
@ 2005-02-24 14:23 ` cvs-commit at gcc dot gnu dot org
  2005-02-24 14:24 ` rth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-24 14:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-24 09:24 -------
Subject: Bug 18902

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2005-02-24 09:24:18

Modified files:
	gcc            : ChangeLog c-opts.c common.opt opts.c toplev.c 
	gcc/doc        : invoke.texi 

Log message:
	PR middle-end/18902
	* c-opts.c (c_common_post_options): Set flag_complex_method to 2
	for c99.
	* common.opt (fcx-limited-range): New.
	* opts.c (set_fast_math_flags): Set flag_cx_limited_range.
	* toplev.c (flag_complex_method): Initialize to 1.
	(process_options): Set flag_complex_method to 0 if
	flag_cx_limited_range.
	* doc/invoke.texi (-fcx-limited-range): New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7576&r2=2.7577
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-opts.c.diff?cvsroot=gcc&r1=1.135&r2=1.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/common.opt.diff?cvsroot=gcc&r1=1.61&r2=1.62
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/opts.c.diff?cvsroot=gcc&r1=1.93&r2=1.94
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&r1=1.943&r2=1.944
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&r1=1.582&r2=1.583



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (21 preceding siblings ...)
  2005-02-24 14:23 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-24 14:24 ` rth at gcc dot gnu dot org
  2005-02-24 16:29 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-24 14:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2005-02-24 09:25 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (22 preceding siblings ...)
  2005-02-24 14:24 ` rth at gcc dot gnu dot org
@ 2005-02-24 16:29 ` pinskia at gcc dot gnu dot org
  2005-02-25  1:00 ` rth at gcc dot gnu dot org
  2005-03-31 21:38 ` rth at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-24 16:29 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (23 preceding siblings ...)
  2005-02-24 16:29 ` pinskia at gcc dot gnu dot org
@ 2005-02-25  1:00 ` rth at gcc dot gnu dot org
  2005-03-31 21:38 ` rth at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-25  1:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18902 depends on bug 19953, which changed state.

Bug 19953 Summary: Special-case real + complex arithmetic operation (-ffast-math)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19953

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [Bug middle-end/18902] Naive (default) complex division algorithm
  2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
                   ` (24 preceding siblings ...)
  2005-02-25  1:00 ` rth at gcc dot gnu dot org
@ 2005-03-31 21:38 ` rth at gcc dot gnu dot org
  25 siblings, 0 replies; 27+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-03-31 21:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 18902 depends on bug 19974, which changed state.

Bug 19974 Summary: incorrect complex division on ia-64 with flag_complex_method = 2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19974

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2005-03-31 21:38 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-09 11:08 [Bug middle-end/18902] New: Naive (default) complex division algorithm pcarlini at suse dot de
2004-12-09 11:09 ` [Bug middle-end/18902] " pcarlini at suse dot de
2004-12-09 11:17 ` joseph at codesourcery dot com
2004-12-09 11:26 ` pcarlini at suse dot de
2004-12-09 11:33 ` pcarlini at suse dot de
2004-12-09 11:46 ` joseph at codesourcery dot com
2004-12-09 13:02 ` pcarlini at suse dot de
2004-12-09 13:25 ` joseph at codesourcery dot com
2004-12-09 13:32 ` pcarlini at suse dot de
2004-12-09 16:04 ` gdr at integrable-solutions dot net
2004-12-23 23:05 ` bangerth at dealii dot org
2004-12-23 23:22 ` pcarlini at suse dot de
2005-01-20 10:45 ` Thomas dot Koenig at online dot de
2005-01-20 11:50 ` pcarlini at suse dot de
2005-01-20 12:11 ` pcarlini at suse dot de
2005-01-21 20:23 ` toon at moene dot indiv dot nluug dot nl
     [not found] ` <18548577.1106258230876.JavaMail.root@dtm1eusosrv72.dtm.ops.eu.uu.net>
2005-01-21 20:23   ` Toon Moene
2005-01-24  2:32 ` rth at gcc dot gnu dot org
2005-01-25 18:26 ` rth at gcc dot gnu dot org
2005-01-26  9:32 ` Thomas dot Koenig at online dot de
2005-01-26 10:54 ` pcarlini at suse dot de
2005-02-02 12:54 ` pcarlini at suse dot de
2005-02-24 14:23 ` cvs-commit at gcc dot gnu dot org
2005-02-24 14:24 ` rth at gcc dot gnu dot org
2005-02-24 16:29 ` pinskia at gcc dot gnu dot org
2005-02-25  1:00 ` rth at gcc dot gnu dot org
2005-03-31 21:38 ` rth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).