home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!cs.utexas.edu!sun-barr!sh.wide!wnoc-tyo-news!scslwide!wsgw!headgw!crlavgw!totsuka
- From: totsuka@av.crl.sony.co.jp (Takashi Totsuka)
- Newsgroups: comp.sys.sgi
- Subject: Re: gcc2.2.2 on Iris Crimson (HELP!)
- Message-ID: <TOTSUKA.92Aug28082940@avaia.av.crl.sony.co.jp>
- Date: 27 Aug 92 23:29:40 GMT
- References: <TOTSUKA.92Aug27145458@avaia.av.crl.sony.co.jp>
- <1992Aug27.131203.11184@dcs.warwick.ac.uk>
- Sender: news@av.crl.sony.co.jp
- Distribution: comp
- Organization: SONY Corporation, JAPAN
- Lines: 36
- In-reply-to: steve@maths.warwick.ac.uk's message of 27 Aug 92 13:12:03 GMT
-
- In article <1992Aug27.131203.11184@dcs.warwick.ac.uk> steve@maths.warwick.ac.uk (Steve Rumsby) writes:
-
-
- |In article <TOTSUKA.92Aug27145458@avaia.av.crl.sony.co.jp>, totsuka@av.crl.sony.co.jp (Takashi Totsuka) writes:
- |>
- |> Is there anyone who has successfully installed GCC(G++)2.2.2 and
- |> libg++2.2.2 on IRIS Crimson ?
- |>
- |> I am having a strange problem with one of the test program
- |> (tComplex.cc). The sqrt() method of Complex class returns
- |> different value each time it is called with the same constant
- |> arguments... Specifying -mcpu=r4000 didn't help.
- |>
- |> I appreciate any suggestions. Thanks in advance.
- |>
- |Same things happens on a R3000 Indigo too. I finally trace the problem
- |to the hypot function in the C library (SGI's library, not glibc) which
- |was returning bizarre results, but only after printing a double on cout!
- |I couldn't see any way that these two functions could interfere with
- |each other, so I gave up at that point. If anybody has any ideas about
- |what might be going on, I'd love to hear them.
- |
- |As above, this is all compiling libg++-2.2.2 with gcc-2.2.2.
-
- I also played aound with Complex::sqrt() and noticed funny return
- value of hypot() in SGI libm.a. However, when I check hypot() alone
- with a simple test program, it just works fine (with native cc and
- gcc, with -g and -O). On the other hand, it is true that replacing
- hypot() with its definition (sqrt(x*x + y*y)) fixes the problem.
-
- I suspect G++ is doing some unnecessary conversion or it has
- some problem in procedure call/return...
- --
-
- Takashi Totsuka totsuka@av.crl.sony.co.jp
- SONY Corp.
-