[Bug middle-end/20434] pessimization of complex expression

2006-01-31 Thread pinskia at gcc dot gnu dot org
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20434

[Bug middle-end/20434] pessimization of complex expression

2005-07-07 Thread tkoenig at gcc dot gnu dot org
--- Additional Comments From tkoenig at gcc dot gnu dot org 2005-07-07 09:14 --- This appears to be fixed now in mainline: $ cat complex-parts.c #include #include int main() { float cr,ci; float complex c; foo(&cr,&ci); c = cr+I*ci; return crealf(c)+cimagf(c)<0; }

[Bug middle-end/20434] pessimization of complex expression

2005-03-12 Thread Thomas dot Koenig at online dot de
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-12 23:13 --- (In reply to comment #6) > Well the real reason is creal/cimag returns double and not float. > Use crealf/cimagf instead. You're right, of course. Doing that gets me : foo (&cr, &ci); return cr +

[Bug middle-end/20434] pessimization of complex expression

2005-03-12 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-12 18:07 --- (In reply to comment #5) > Again, the as-if rule: If a and b are floats, the expression > a+b < 0 should be the same for any a and b regardless wether they > are done in float or double. Well the real reas

[Bug middle-end/20434] pessimization of complex expression

2005-03-12 Thread Thomas dot Koenig at online dot de
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-12 09:45 --- (In reply to comment #4) > (In reply to comment #3) > > > > - Why the casts to double? > > > Because that is required by the C standard. > > > > Isn't that covered by the as-if rule? I'm fairly > > sur

[Bug middle-end/20434] pessimization of complex expression

2005-03-11 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-11 22:55 --- (In reply to comment #3) > > > - Why the casts to double? > > Because that is required by the C standard. > > Isn't that covered by the as-if rule? I'm fairly > sure the cast to double won't change the res

[Bug middle-end/20434] pessimization of complex expression

2005-03-11 Thread Thomas dot Koenig at online dot de
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-11 22:49 --- > > - Why the casts to double? > Because that is required by the C standard. Isn't that covered by the as-if rule? I'm fairly sure the cast to double won't change the result of the "<" operator :-) --

[Bug middle-end/20434] pessimization of complex expression

2005-03-11 Thread pinskia at physics dot uc dot edu
--- Additional Comments From pinskia at physics dot uc dot edu 2005-03-11 22:41 --- Subject: Re: pessimization of complex expression On Mar 11, 2005, at 4:59 PM, Thomas dot Koenig at online dot de wrote: > > --- Additional Comments From Thomas dot Koenig at online dot de > 2005

Re: [Bug middle-end/20434] pessimization of complex expression

2005-03-11 Thread Andrew Pinski
On Mar 11, 2005, at 4:59 PM, Thomas dot Koenig at online dot de wrote: --- Additional Comments From Thomas dot Koenig at online dot de 2005-03-11 21:59 --- There are two strange things here: - Why the + 0. ? - Why the casts to double? Because that is required by the C standard. -- Pinski

[Bug middle-end/20434] pessimization of complex expression

2005-03-11 Thread Thomas dot Koenig at online dot de
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-11 21:59 --- There are two strange things here: - Why the + 0. ? - Why the casts to double? -- What|Removed |Added --