OSDN Git Service

PR libfortran/24903
[pf3gnuchains/gcc-fork.git] / libgfortran / generated / sum_c4.c
index 129b919..72d28f8 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 sum_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *);
+#if defined (HAVE_GFC_COMPLEX_4) && defined (HAVE_GFC_COMPLEX_4)
+
+
+extern void sum_c4 (gfc_array_c4 * const restrict, 
+       gfc_array_c4 * const restrict, const index_type * const restrict);
 export_proto(sum_c4);
 
 void
-sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
+sum_c4 (gfc_array_c4 * const restrict retarray, 
+       gfc_array_c4 * const restrict array, 
+       const index_type * const restrict pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
   index_type sstride[GFC_MAX_DIMENSIONS];
   index_type dstride[GFC_MAX_DIMENSIONS];
-  GFC_COMPLEX_4 *base;
-  GFC_COMPLEX_4 *dest;
+  const GFC_COMPLEX_4 * restrict base;
+  GFC_COMPLEX_4 * restrict dest;
   index_type rank;
   index_type n;
   index_type len;
@@ -117,7 +123,7 @@ sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
 
   while (base)
     {
-      GFC_COMPLEX_4 *src;
+      const GFC_COMPLEX_4 * restrict src;
       GFC_COMPLEX_4 result;
       src = base;
       {
@@ -167,22 +173,25 @@ sum_c4 (gfc_array_c4 *retarray, gfc_array_c4 *array, index_type *pdim)
 }
 
 
-extern void msum_c4 (gfc_array_c4 *, gfc_array_c4 *, index_type *,
-                                              gfc_array_l4 *);
+extern void msum_c4 (gfc_array_c4 * const restrict, 
+       gfc_array_c4 * const restrict, const index_type * const restrict,
+       gfc_array_l4 * const restrict);
 export_proto(msum_c4);
 
 void
-msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
-                                 index_type *pdim, gfc_array_l4 * mask)
+msum_c4 (gfc_array_c4 * const restrict retarray, 
+       gfc_array_c4 * const restrict array, 
+       const index_type * const restrict pdim, 
+       gfc_array_l4 * const restrict mask)
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
   index_type sstride[GFC_MAX_DIMENSIONS];
   index_type dstride[GFC_MAX_DIMENSIONS];
   index_type mstride[GFC_MAX_DIMENSIONS];
-  GFC_COMPLEX_4 *dest;
-  GFC_COMPLEX_4 *base;
-  GFC_LOGICAL_4 *mbase;
+  GFC_COMPLEX_4 * restrict dest;
+  const GFC_COMPLEX_4 * restrict base;
+  const GFC_LOGICAL_4 * restrict mbase;
   int rank;
   int dim;
   index_type n;
@@ -273,8 +282,8 @@ msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
 
   while (base)
     {
-      GFC_COMPLEX_4 *src;
-      GFC_LOGICAL_4 *msrc;
+      const GFC_COMPLEX_4 * restrict src;
+      const GFC_LOGICAL_4 * restrict msrc;
       GFC_COMPLEX_4 result;
       src = base;
       msrc = mbase;
@@ -327,3 +336,5 @@ msum_c4 (gfc_array_c4 * retarray, gfc_array_c4 * array,
         }
     }
 }
+
+#endif