pro64-support
[Top] [All Lists]

Re: C++ inlining problem with 0.01.0-10 + update.0828

To: Dan.Pop@xxxxxxx
Subject: Re: C++ inlining problem with 0.01.0-10 + update.0828
From: Richard Shapiro <rshapiro@xxxxxxxx>
Date: Thu, 31 Aug 2000 11:06:07 -0400
Cc: mpm@xxxxxxxxxxxxxxxxx, pro64-support@xxxxxxxxxxx, rat@xxxxxxxxxxxxxxxxxxx, Sverre.Jarp@xxxxxxx
In-reply-to: <Pine.OSF.3.95a.1000830014624.22360f-100000@ues5.cern.ch> (message from Dan Pop on Wed, 30 Aug 2000 01:53:04 +0200 (MET DST))
References: <Pine.OSF.3.95a.1000830014624.22360f-100000@ues5.cern.ch>
Sender: owner-pro64-support@xxxxxxxxxxx
   Date:   Wed, 30 Aug 2000 01:53:04 +0200 (MET DST)
   From: Dan Pop <Dan.Pop@xxxxxxx>
   X-Sender: danpop@xxxxxxxxxxxx
   Cc: pro64-support@xxxxxxxxxxx, "Ross A. Towle" <rat@xxxxxxxxxxxxxxxxxxx>,
           Sverre Jarp <Sverre.Jarp@xxxxxxx>
   X-Orcpt: rfc822;pro64-support@xxxxxxxxxxx
   Sender: owner-pro64-support@xxxxxxxxxxx
   Precedence: bulk
   Content-Type: TEXT/PLAIN; charset=US-ASCII
   Content-Length: 459



   On Tue, 29 Aug 2000, Michael Murphy wrote:

   >    From: "Ross A. Towle" <rat@cchkms>
   >    
   >    Add -lm to your command line to link in the math library routines.  
This is
   >    needed for c and c++ programs.

   Thanks for the advice.

   The confusing thing is that -lm is not needed without -O or with g++
   at any optimisation level.  Had I gotten any linking errors about
   sin and cos (both used in the code), the -lm fix would have been
   obvious.

   Best regards,
   Dan Pop


The optimizer tries to merge sin(x) and cos(x) into a single call to cis(x)
(returns both sine and cosine, but is much more efficient). This is why you
don't see the calls to sin or cos. 


<Prev in Thread] Current Thread [Next in Thread>