home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / sgi / 12999 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  2.2 KB

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