summaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-18 08:47:28 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-18 08:47:28 +0000
commitc663e582cdd144f01a5c40c87c35e2824c9336c7 (patch)
tree8dc796e48fd1a13532a20e8ae40510e9eeff313c /libgfortran/intrinsics
parenta5e56906985aeef6c378426440237066ea0f5dd2 (diff)
downloadgcc-c663e582cdd144f01a5c40c87c35e2824c9336c7.tar.gz
PR libfortran/31286
PR libfortran/31296 * intrinsics/cshift0.c (cshift0): Initialize sstride[0] and rstride[0]. * intrinsics/unpack_generic.c (unpack0, unpack0_char): Zero the array structures we pass to unpack_internal. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r--libgfortran/intrinsics/cshift0.c2
-rw-r--r--libgfortran/intrinsics/unpack_generic.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/libgfortran/intrinsics/cshift0.c b/libgfortran/intrinsics/cshift0.c
index f2c2219dd30..2ecf30e5f76 100644
--- a/libgfortran/intrinsics/cshift0.c
+++ b/libgfortran/intrinsics/cshift0.c
@@ -103,6 +103,8 @@ cshift0 (gfc_array_char * ret, const gfc_array_char * array,
runtime_error ("Argument 'DIM' is out of range in call to 'CSHIFT'");
which = which - 1;
+ sstride[0] = 0;
+ rstride[0] = 0;
extent[0] = 1;
count[0] = 0;
diff --git a/libgfortran/intrinsics/unpack_generic.c b/libgfortran/intrinsics/unpack_generic.c
index 5cf96666df9..13166f9db2f 100644
--- a/libgfortran/intrinsics/unpack_generic.c
+++ b/libgfortran/intrinsics/unpack_generic.c
@@ -209,6 +209,7 @@ unpack0 (gfc_array_char *ret, const gfc_array_char *vector,
{
gfc_array_char tmp;
+ memset (&tmp, 0, sizeof (tmp));
tmp.dtype = 0;
tmp.data = field;
unpack_internal (ret, vector, mask, &tmp, GFC_DESCRIPTOR_SIZE (vector), 0);
@@ -228,6 +229,7 @@ unpack0_char (gfc_array_char *ret,
{
gfc_array_char tmp;
+ memset (&tmp, 0, sizeof (tmp));
tmp.dtype = 0;
tmp.data = field;
unpack_internal (ret, vector, mask, &tmp, vector_length, 0);