This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: revap types, step 1


On Thu, Aug 26, 2004 at 05:52:56PM +0200, Tobias Schl?ter wrote:
> Steve Kargl wrote:
> > On Wed, Aug 25, 2004 at 11:14:44PM -0700, Richard Henderson wrote:
> > 
> >>+ 
> >>+   /* Choose the default double kind.  F2003 merely says that DOUBLE
> >>+      PRECISION should be larger than REAL.  Traditionally, DOUBLE
> >>+      PRECISION is twice the size of REAL.  We may or may not be able
> >>+      to honor either of these constraints, but try our best.  */
> > 
> > I might be misreading this comment.  Are you saying that
> > sizeof(DOUBLE PRECISION) may not be equal to 2*sizeof(REAL)
> > with your patch?  This may break a boat load of code that
> > uses EQUIVALENCE statements.  OTOH, your patch looks to be
> > a major improvement over the previous code.
> > 
> 
> (Quotes from the draft Fortran 95 standard.)
> 
> Just to make clear the requirements of the standard:
> 
> WRT precision the standard says this (4.3.1.2, before R412): "The decimal
> precision of the double precision real approximation method shall be greater
> than that of the default real method."
> 
> And under 14.6.3.1:
> "In a storage association context
> 
> (1) A nonpointer scalar object of type default integer, default real, or
> default logical occupies a single numeric storage unit;
> 
> (2) A nonpointer scalar object of type double precision real or default
> complex occupies two contiguous numeric storage units;
> 
> etc."
> 
> Note that these requirements are independent, depending on how we layout
> equivalences we could be even fulfilling the latter requirement, if we don't
> fulfill the former (that is, in the case of -r8; I don't know how we handle
> this right now).
> 

Thanks, Tobi.  I didn't have my copy of the draft F2003 standard
handy to look up the text.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]