This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30360] Complex divide bug
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2007 21:31:24 -0000
- Subject: [Bug c/30360] Complex divide bug
- References: <bug-30360-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from joseph at codesourcery dot com 2007-01-03 21:31 -------
Subject: Re: New: Complex divide bug
On Wed, 3 Jan 2007, jakub at gcc dot gnu dot org wrote:
> fails when compiled with -O0 -std=c99 but succeeds when compiled with -O2
> -std=c99. ISO C99 says it should be (inf, inf) always in G.5.1 (4):
> "if the first operand is a nonzero finite number or an infinity and the second
> operand is a zero, then the result of the / operator is an infinity."
"is an infinity" allows (inf, NaN) and (NaN, inf), it doesn't require
(inf, inf) (G.3#1: "A complex or imaginary value with at least one
infinite part is regarded as an infinity (even if its other part is a
NaN)."). Thus at least the testcase needs to change.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30360