From 800c028f45318dfd2548363d2fad6fc2d3d62c06 Mon Sep 17 00:00:00 2001
From: steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue, 14 Dec 2004 10:43:36 +0000
Subject: [PATCH]        PR libfortran/18966         * gfortran.h: typedef
 GFC_INTEGER_1 and GFC_INTEGER_2         * intrinsics/cshift0.c
 (cshift0_1,cshift0_2): New functions.         * intrinsics/eoshift0.c
 (eoshift0_1,eoshift0_2): New functions.         * intrinsics/eoshift2.c
 (eoshift2_1,eoshift2_2): New functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92132 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libgfortran/ChangeLog             |  8 ++++++++
 libgfortran/intrinsics/cshift0.c  | 26 ++++++++++++++++++++++++++
 libgfortran/intrinsics/eoshift0.c | 31 +++++++++++++++++++++++++++++++
 libgfortran/intrinsics/eoshift2.c | 31 +++++++++++++++++++++++++++++++
 libgfortran/libgfortran.h         |  2 ++
 5 files changed, 98 insertions(+)

diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 0b4134c23ead..2a6ecf682819 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,11 @@
+2004-12-05  Steven G. Kargl  <kargls@comcast.net>
+
+	PR libfortran/18966
+	* gfortran.h: typedef GFC_INTEGER_1 and GFC_INTEGER_2
+	* intrinsics/cshift0.c (cshift0_1,cshift0_2): New functions.
+	* intrinsics/eoshift0.c (eoshift0_1,eoshift0_2): New functions.
+	* intrinsics/eoshift2.c (eoshift2_1,eoshift2_2): New functions.
+
 2004-12-13  David Edelsohn  <edelsohn@gnu.org>
 
 	* io/transfer.c (read_sf): Change bitwise "and" to logical "and".
diff --git a/libgfortran/intrinsics/cshift0.c b/libgfortran/intrinsics/cshift0.c
index 4783eda7c61e..f712629d5df9 100644
--- a/libgfortran/intrinsics/cshift0.c
+++ b/libgfortran/intrinsics/cshift0.c
@@ -238,6 +238,30 @@ cshift0 (gfc_array_char * ret, const gfc_array_char * array,
 }
 
 
+extern void cshift0_1 (gfc_array_char *, const gfc_array_char *,
+		       const GFC_INTEGER_1 *, const GFC_INTEGER_1 *);
+export_proto(cshift0_1);
+
+void
+cshift0_1 (gfc_array_char *ret, const gfc_array_char *array,
+	   const GFC_INTEGER_1 *pshift, const GFC_INTEGER_1 *pdim)
+{
+  cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
+}
+
+
+extern void cshift0_2 (gfc_array_char *, const gfc_array_char *,
+		       const GFC_INTEGER_2 *, const GFC_INTEGER_2 *);
+export_proto(cshift0_2);
+
+void
+cshift0_2 (gfc_array_char *ret, const gfc_array_char *array,
+	   const GFC_INTEGER_2 *pshift, const GFC_INTEGER_2 *pdim)
+{
+  cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
+}
+
+
 extern void cshift0_4 (gfc_array_char *, const gfc_array_char *,
 		       const GFC_INTEGER_4 *, const GFC_INTEGER_4 *);
 export_proto(cshift0_4);
@@ -249,6 +273,7 @@ cshift0_4 (gfc_array_char *ret, const gfc_array_char *array,
   cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
 }
 
+
 extern void cshift0_8 (gfc_array_char *, const gfc_array_char *,
 		       const GFC_INTEGER_8 *, const GFC_INTEGER_8 *);
 export_proto(cshift0_8);
@@ -259,3 +284,4 @@ cshift0_8 (gfc_array_char *ret, const gfc_array_char *array,
 {
   cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
 }
+
diff --git a/libgfortran/intrinsics/eoshift0.c b/libgfortran/intrinsics/eoshift0.c
index 66f0ab1f6eaf..efe880deb7c5 100644
--- a/libgfortran/intrinsics/eoshift0.c
+++ b/libgfortran/intrinsics/eoshift0.c
@@ -187,6 +187,35 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
     }
 }
 
+
+extern void eoshift0_1 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_1 *, const char *,
+			const GFC_INTEGER_1 *);
+export_proto(eoshift0_1);
+
+void
+eoshift0_1 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_1 *pshift, const char *pbound,
+	    const GFC_INTEGER_1 *pdim)
+{
+  eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
+}
+
+
+extern void eoshift0_2 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_2 *, const char *,
+			const GFC_INTEGER_2 *);
+export_proto(eoshift0_2);
+
+void
+eoshift0_2 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_2 *pshift, const char *pbound,
+	    const GFC_INTEGER_2 *pdim)
+{
+  eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
+}
+
+
 extern void eoshift0_4 (gfc_array_char *, const gfc_array_char *,
 			const GFC_INTEGER_4 *, const char *,
 			const GFC_INTEGER_4 *);
@@ -200,6 +229,7 @@ eoshift0_4 (gfc_array_char *ret, const gfc_array_char *array,
   eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
 }
 
+
 extern void eoshift0_8 (gfc_array_char *, const gfc_array_char *,
 			const GFC_INTEGER_8 *, const char *,
 			const GFC_INTEGER_8 *);
@@ -212,3 +242,4 @@ eoshift0_8 (gfc_array_char *ret, const gfc_array_char *array,
 {
   eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
 }
+
diff --git a/libgfortran/intrinsics/eoshift2.c b/libgfortran/intrinsics/eoshift2.c
index e7409e670499..67ca7d2b89c6 100644
--- a/libgfortran/intrinsics/eoshift2.c
+++ b/libgfortran/intrinsics/eoshift2.c
@@ -203,6 +203,35 @@ eoshift2 (gfc_array_char *ret, const gfc_array_char *array,
     }
 }
 
+
+extern void eoshift2_1 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_1 *, const gfc_array_char *,
+			const GFC_INTEGER_1 *);
+export_proto(eoshift2_1);
+
+void
+eoshift2_1 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_1 *pshift, const gfc_array_char *bound,
+	    const GFC_INTEGER_1 *pdim)
+{
+  eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
+}
+
+
+extern void eoshift2_2 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_2 *, const gfc_array_char *,
+			const GFC_INTEGER_2 *);
+export_proto(eoshift2_2);
+
+void
+eoshift2_2 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_2 *pshift, const gfc_array_char *bound,
+	    const GFC_INTEGER_2 *pdim)
+{
+  eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
+}
+
+
 extern void eoshift2_4 (gfc_array_char *, const gfc_array_char *,
 			const GFC_INTEGER_4 *, const gfc_array_char *,
 			const GFC_INTEGER_4 *);
@@ -216,6 +245,7 @@ eoshift2_4 (gfc_array_char *ret, const gfc_array_char *array,
   eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
 }
 
+
 extern void eoshift2_8 (gfc_array_char *, const gfc_array_char *,
 			const GFC_INTEGER_8 *, const gfc_array_char *,
 			const GFC_INTEGER_8 *);
@@ -228,3 +258,4 @@ eoshift2_8 (gfc_array_char *ret, const gfc_array_char *array,
 {
   eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
 }
+
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index c259e5655669..ca8beb2fc949 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -185,6 +185,8 @@ isfinite (double x)
 #define IMAGPART(z) (__imag__(z))
 #define COMPLEX_ASSIGN(z_, r_, i_) {__real__(z_) = (r_); __imag__(z_) = (i_);}
 
+typedef int8_t GFC_INTEGER_1;
+typedef int16_t GFC_INTEGER_2;
 typedef int32_t GFC_INTEGER_4;
 typedef int64_t GFC_INTEGER_8;
 typedef uint32_t GFC_UINTEGER_4;
-- 
GitLab