gfortran.texi (Old-style kind specifications): Document special handling of old-style...
authorBrooks Moses <brooks.moses@codesourcery.com>
Tue, 6 Mar 2007 08:00:02 +0000 (08:00 +0000)
committerBrooks Moses <brooks@gcc.gnu.org>
Tue, 6 Mar 2007 08:00:02 +0000 (00:00 -0800)
* gfortran.texi (Old-style kind specifications): Document
special handling of old-style kind specifiers for COMPLEX.
* decl.c (gfc_match_old_kind_spec): Document kind/bytesize
assumptions for COMPLEX in comment.

From-SVN: r122599

gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/gfortran.texi

index b3fb4c38669c348ba9a954633c99d700d2e637dc..73bd633f77d734a11a44d3c9a3b807bca2120370 100644 (file)
@@ -1,3 +1,10 @@
+2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
+
+       * gfortran.texi (Old-style kind specifications): Document
+       special handling of old-style kind specifiers for COMPLEX.
+       * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
+       assumptions for COMPLEX in comment.
+
 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
 
        PR 31050
index f6ffc1df7fe3710942f8c6ed0e0a277060309d9c..173ad45eb214471b0ccd8659a05ac31a97d0d1ef 100644 (file)
@@ -1373,9 +1373,9 @@ cleanup:
 }
 
 
-/* Match an extended-f77 kind specification.  This assumes that the kind
-   number is equal to the byte size for non-COMPLEX types, and equal to 
-   half of the byte size for COMPLEX.  */
+/* Match an extended-f77 "TYPESPEC*bytesize"-style kind specification.
+   This assumes that the byte size is equal to the kind number for
+   non-COMPLEX types, and equal to twice the kind number for COMPLEX.  */
 
 match
 gfc_match_old_kind_spec (gfc_typespec *ts)
index 30a84c77eb7c8ba56c25784445550969c8c9b26a..3c185630967b19016091e4da787f89c553e67636 100644 (file)
@@ -840,14 +840,18 @@ look like:
 @smallexample
       TYPESPEC*size x,y,z
 @end smallexample
+@noindent
 where @code{TYPESPEC} is a basic type (@code{INTEGER}, @code{REAL},
-etc.), and where @code{size} is a byte count corresponding to a valid
-kind for that type. The statement then declares @code{x}, @code{y} and
-@code{z} to be of type @code{TYPESPEC} with the appropriate kind. This
-is equivalent to the standard conforming declaration
+etc.), and where @code{size} is a byte count corresponding to the
+storage size of a valid kind for that type.  (For @code{COMPLEX}
+variables, @code{size} is the total size of the real and imaginary
+parts.)  The statement then declares @code{x}, @code{y} and @code{z} to
+be of type @code{TYPESPEC} with the appropriate kind.  This is
+equivalent to the standard-conforming declaration
 @smallexample
       TYPESPEC(k) x,y,z
 @end smallexample
+@noindent
 where @code{k} is equal to @code{size} for most types, but is equal to
 @code{size/2} for the @code{COMPLEX} type.