www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/2000/03/05/23:17:22

X-Url: http://www.deakin.edu.au/~dpyke
Message-Id: <4.3.2.20000306115530.00ada100@mail-s.deakin.edu.au>
X-Sender: dspyke AT mail-s DOT deakin DOT edu DOT au
X-Mailer: QUALCOMM Windows Eudora Version 4.3
Date: Mon, 06 Mar 2000 11:58:07 +1100
To: pgcc AT delorie DOT com
From: David Pyke <dspyke AT deakin DOT edu DOT au>
Subject: Re: inline optimizer bug
In-Reply-To: <38BCDFC0.8AA4C88B@nao.ac.jp>
References: <Pine DOT SGI DOT 4 DOT 21 DOT 0003011055380 DOT 14017478-100000 AT paju DOT oulu DOT fi>
Mime-Version: 1.0
Reply-To: pgcc AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: pgcc AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

did you try using brackets at all???

altho if that was the problem i'd be very surprised.

ie...
static inline mycomplex
zmlt (mycomplex z1, mycomplex z2)
{
   mycomplex z;

   z.re = (z1.re * z2.re) - (z1.im * z2.im);
   z.im = (z1.re * z2.im) + (z1.im * z2.re);

   return z;
}


Shoe Lace....

At 06:15 PM 3/1/00 +0900, you wrote:
>Tuukka Toivonen wrote:
> >
> > > I use
> > > pgcc-2.95.2 19991024 (release)
> >
> > Sorry I can't help you. But I wonder if you have noticed the
> > "complex" datatype in GCC? If you want to write ANSI C, you can't use it,
> > but if it's ok to use GCC only, it makes complex calculations much easier.
> >
> > __complex__ double x;
> >
> > main() {
> >         x = 1.0 + 3.0i;
> >         x = x / (2.0 - 2.0i);
> >         printf("%f + %fi\n", __real__ x, __imag__ x);
> > }
> >
>
>Thanks, I know about it.
>
>The piece of code that caused the optimizer bug
>came from a "f2c" 'ed FORTRAN program which
>defines "complex" differently, hence
>my own definition of "mycomplex".
>
>But I think this has nothing to do
>with the optimizer bug, which, by the way,
>seems NOT to present in the mainline gcc 2.95.2
>
>Gerhard
>
>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>  Gerhard Heinzel                   e-mail: gerhard DOT heinzel AT nao DOT ac DOT jp
>  Space-Time Astronomy Section,
>  National Astronomical Observatory, 2-21-1 Ohsawa, Mitaka,
>  Tokyo 181-8588, Japan,    FAX: 81+422-34-3793,  Tel. 81+422-34-3618
>  http://tamago.mtk.nao.ac.jp/
>http://users.cybercity.dk/~cis6614/Lucia
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019