OSDN Git Service

Whitespace fixups
[pf3gnuchains/gcc-fork.git] / libgfortran / generated / any_l8.c
index 7814797..ed45e79 100644 (file)
@@ -25,8 +25,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public
 License along with libgfortran; see the file COPYING.  If not,
-write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 #include "config.h"
 #include <stdlib.h>
@@ -34,18 +34,24 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"
 
 
-extern void any_l8 (gfc_array_l8 *, gfc_array_l8 *, index_type *);
+#if defined (HAVE_GFC_LOGICAL_8) && defined (HAVE_GFC_LOGICAL_8)
+
+
+extern void any_l8 (gfc_array_l8 * const restrict, 
+       gfc_array_l8 * const restrict, const index_type * const restrict);
 export_proto(any_l8);
 
 void
-any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
+any_l8 (gfc_array_l8 * const restrict retarray, 
+       gfc_array_l8 * const restrict array, 
+       const index_type * const restrict pdim)
 {
-  index_type count[GFC_MAX_DIMENSIONS - 1];
-  index_type extent[GFC_MAX_DIMENSIONS - 1];
-  index_type sstride[GFC_MAX_DIMENSIONS - 1];
-  index_type dstride[GFC_MAX_DIMENSIONS - 1];
-  GFC_LOGICAL_8 *base;
-  GFC_LOGICAL_8 *dest;
+  index_type count[GFC_MAX_DIMENSIONS];
+  index_type extent[GFC_MAX_DIMENSIONS];
+  index_type sstride[GFC_MAX_DIMENSIONS];
+  index_type dstride[GFC_MAX_DIMENSIONS];
+  const GFC_LOGICAL_8 * restrict base;
+  GFC_LOGICAL_8 * restrict dest;
   index_type rank;
   index_type n;
   index_type len;
@@ -55,6 +61,9 @@ any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
   /* Make dim zero based to avoid confusion.  */
   dim = (*pdim) - 1;
   rank = GFC_DESCRIPTOR_RANK (array) - 1;
+
+  /* TODO:  It should be a front end job to correctly set the strides.  */
+
   if (array->dim[0].stride == 0)
     array->dim[0].stride = 1;
 
@@ -89,7 +98,7 @@ any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
         = internal_malloc_size (sizeof (GFC_LOGICAL_8)
                                 * retarray->dim[rank-1].stride
                                 * extent[rank-1]);
-      retarray->base = 0;
+      retarray->offset = 0;
       retarray->dtype = (array->dtype & ~GFC_DTYPE_RANK_MASK) | rank;
     }
   else
@@ -114,7 +123,7 @@ any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
 
   while (base)
     {
-      GFC_LOGICAL_8 *src;
+      const GFC_LOGICAL_8 * restrict src;
       GFC_LOGICAL_8 result;
       src = base;
       {
@@ -168,3 +177,4 @@ any_l8 (gfc_array_l8 *retarray, gfc_array_l8 *array, index_type *pdim)
     }
 }
 
+#endif