https://gcc.gnu.org/g:46ce1c80a216b6d83995997377c0285c1c75f5fa
commit 46ce1c80a216b6d83995997377c0285c1c75f5fa Author: Mikael Morin <[email protected]> Date: Tue Sep 9 17:04:48 2025 +0200 Régénération fichiers générés Diff: --- libgfortran/generated/cshift0_c10.c | 22 +++++++++++----------- libgfortran/generated/cshift0_c16.c | 22 +++++++++++----------- libgfortran/generated/cshift0_c17.c | 22 +++++++++++----------- libgfortran/generated/cshift0_c4.c | 22 +++++++++++----------- libgfortran/generated/cshift0_c8.c | 22 +++++++++++----------- libgfortran/generated/cshift0_i1.c | 22 +++++++++++----------- libgfortran/generated/cshift0_i16.c | 22 +++++++++++----------- libgfortran/generated/cshift0_i2.c | 22 +++++++++++----------- libgfortran/generated/cshift0_i4.c | 22 +++++++++++----------- libgfortran/generated/cshift0_i8.c | 22 +++++++++++----------- libgfortran/generated/cshift0_r10.c | 22 +++++++++++----------- libgfortran/generated/cshift0_r16.c | 22 +++++++++++----------- libgfortran/generated/cshift0_r17.c | 22 +++++++++++----------- libgfortran/generated/cshift0_r4.c | 22 +++++++++++----------- libgfortran/generated/cshift0_r8.c | 22 +++++++++++----------- 15 files changed, 165 insertions(+), 165 deletions(-) diff --git a/libgfortran/generated/cshift0_c10.c b/libgfortran/generated/cshift0_c10.c index c8b526768e12..f7e2947aaf9d 100644 --- a/libgfortran/generated/cshift0_c10.c +++ b/libgfortran/generated/cshift0_c10.c @@ -111,10 +111,10 @@ cshift0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_COMPLEX_10); + rstride[0] = sizeof (GFC_COMPLEX_10); + roffset = sizeof (GFC_COMPLEX_10); + soffset = sizeof (GFC_COMPLEX_10); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_COMPLEX_10); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_COMPLEX_10); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_COMPLEX_10); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_COMPLEX_10); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_COMPLEX_10) && roffset == sizeof (GFC_COMPLEX_10)) { size_t len1 = shift * sizeof (GFC_COMPLEX_10); size_t len2 = (len - shift) * sizeof (GFC_COMPLEX_10); @@ -190,7 +190,7 @@ cshift0_c10 (gfc_array_c10 *ret, const gfc_array_c10 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_COMPLEX_10 *dest = rptr; - const GFC_COMPLEX_10 *src = &sptr[shift * soffset]; + const GFC_COMPLEX_10 *src = (const GFC_COMPLEX_10 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_c16.c b/libgfortran/generated/cshift0_c16.c index 24593e234d04..5326c1fb2833 100644 --- a/libgfortran/generated/cshift0_c16.c +++ b/libgfortran/generated/cshift0_c16.c @@ -111,10 +111,10 @@ cshift0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_COMPLEX_16); + rstride[0] = sizeof (GFC_COMPLEX_16); + roffset = sizeof (GFC_COMPLEX_16); + soffset = sizeof (GFC_COMPLEX_16); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_COMPLEX_16); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_COMPLEX_16); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_COMPLEX_16); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_COMPLEX_16); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_COMPLEX_16) && roffset == sizeof (GFC_COMPLEX_16)) { size_t len1 = shift * sizeof (GFC_COMPLEX_16); size_t len2 = (len - shift) * sizeof (GFC_COMPLEX_16); @@ -190,7 +190,7 @@ cshift0_c16 (gfc_array_c16 *ret, const gfc_array_c16 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_COMPLEX_16 *dest = rptr; - const GFC_COMPLEX_16 *src = &sptr[shift * soffset]; + const GFC_COMPLEX_16 *src = (const GFC_COMPLEX_16 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_c17.c b/libgfortran/generated/cshift0_c17.c index b8047ae4aad8..3309c8dfe96b 100644 --- a/libgfortran/generated/cshift0_c17.c +++ b/libgfortran/generated/cshift0_c17.c @@ -111,10 +111,10 @@ cshift0_c17 (gfc_array_c17 *ret, const gfc_array_c17 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_COMPLEX_17); + rstride[0] = sizeof (GFC_COMPLEX_17); + roffset = sizeof (GFC_COMPLEX_17); + soffset = sizeof (GFC_COMPLEX_17); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_c17 (gfc_array_c17 *ret, const gfc_array_c17 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_COMPLEX_17); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_COMPLEX_17); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_c17 (gfc_array_c17 *ret, const gfc_array_c17 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_COMPLEX_17); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_COMPLEX_17); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_c17 (gfc_array_c17 *ret, const gfc_array_c17 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_COMPLEX_17) && roffset == sizeof (GFC_COMPLEX_17)) { size_t len1 = shift * sizeof (GFC_COMPLEX_17); size_t len2 = (len - shift) * sizeof (GFC_COMPLEX_17); @@ -190,7 +190,7 @@ cshift0_c17 (gfc_array_c17 *ret, const gfc_array_c17 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_COMPLEX_17 *dest = rptr; - const GFC_COMPLEX_17 *src = &sptr[shift * soffset]; + const GFC_COMPLEX_17 *src = (const GFC_COMPLEX_17 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_c4.c b/libgfortran/generated/cshift0_c4.c index e6dcb74cbb03..64090375ba00 100644 --- a/libgfortran/generated/cshift0_c4.c +++ b/libgfortran/generated/cshift0_c4.c @@ -111,10 +111,10 @@ cshift0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_COMPLEX_4); + rstride[0] = sizeof (GFC_COMPLEX_4); + roffset = sizeof (GFC_COMPLEX_4); + soffset = sizeof (GFC_COMPLEX_4); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_COMPLEX_4); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_COMPLEX_4); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_COMPLEX_4); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_COMPLEX_4); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_COMPLEX_4) && roffset == sizeof (GFC_COMPLEX_4)) { size_t len1 = shift * sizeof (GFC_COMPLEX_4); size_t len2 = (len - shift) * sizeof (GFC_COMPLEX_4); @@ -190,7 +190,7 @@ cshift0_c4 (gfc_array_c4 *ret, const gfc_array_c4 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_COMPLEX_4 *dest = rptr; - const GFC_COMPLEX_4 *src = &sptr[shift * soffset]; + const GFC_COMPLEX_4 *src = (const GFC_COMPLEX_4 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_c8.c b/libgfortran/generated/cshift0_c8.c index 23d4b1de0c71..756c0bb2bea2 100644 --- a/libgfortran/generated/cshift0_c8.c +++ b/libgfortran/generated/cshift0_c8.c @@ -111,10 +111,10 @@ cshift0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_COMPLEX_8); + rstride[0] = sizeof (GFC_COMPLEX_8); + roffset = sizeof (GFC_COMPLEX_8); + soffset = sizeof (GFC_COMPLEX_8); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_COMPLEX_8); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_COMPLEX_8); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_COMPLEX_8); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_COMPLEX_8); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_COMPLEX_8) && roffset == sizeof (GFC_COMPLEX_8)) { size_t len1 = shift * sizeof (GFC_COMPLEX_8); size_t len2 = (len - shift) * sizeof (GFC_COMPLEX_8); @@ -190,7 +190,7 @@ cshift0_c8 (gfc_array_c8 *ret, const gfc_array_c8 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_COMPLEX_8 *dest = rptr; - const GFC_COMPLEX_8 *src = &sptr[shift * soffset]; + const GFC_COMPLEX_8 *src = (const GFC_COMPLEX_8 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_i1.c b/libgfortran/generated/cshift0_i1.c index 5a9d92cf95b1..e2bfebd2ece0 100644 --- a/libgfortran/generated/cshift0_i1.c +++ b/libgfortran/generated/cshift0_i1.c @@ -111,10 +111,10 @@ cshift0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_INTEGER_1); + rstride[0] = sizeof (GFC_INTEGER_1); + roffset = sizeof (GFC_INTEGER_1); + soffset = sizeof (GFC_INTEGER_1); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_INTEGER_1); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_INTEGER_1); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_INTEGER_1); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_INTEGER_1); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_INTEGER_1) && roffset == sizeof (GFC_INTEGER_1)) { size_t len1 = shift * sizeof (GFC_INTEGER_1); size_t len2 = (len - shift) * sizeof (GFC_INTEGER_1); @@ -190,7 +190,7 @@ cshift0_i1 (gfc_array_i1 *ret, const gfc_array_i1 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_INTEGER_1 *dest = rptr; - const GFC_INTEGER_1 *src = &sptr[shift * soffset]; + const GFC_INTEGER_1 *src = (const GFC_INTEGER_1 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_i16.c b/libgfortran/generated/cshift0_i16.c index 6db2b28a475a..b34d12a0bef3 100644 --- a/libgfortran/generated/cshift0_i16.c +++ b/libgfortran/generated/cshift0_i16.c @@ -111,10 +111,10 @@ cshift0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_INTEGER_16); + rstride[0] = sizeof (GFC_INTEGER_16); + roffset = sizeof (GFC_INTEGER_16); + soffset = sizeof (GFC_INTEGER_16); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_INTEGER_16); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_INTEGER_16); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_INTEGER_16); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_INTEGER_16); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_INTEGER_16) && roffset == sizeof (GFC_INTEGER_16)) { size_t len1 = shift * sizeof (GFC_INTEGER_16); size_t len2 = (len - shift) * sizeof (GFC_INTEGER_16); @@ -190,7 +190,7 @@ cshift0_i16 (gfc_array_i16 *ret, const gfc_array_i16 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_INTEGER_16 *dest = rptr; - const GFC_INTEGER_16 *src = &sptr[shift * soffset]; + const GFC_INTEGER_16 *src = (const GFC_INTEGER_16 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_i2.c b/libgfortran/generated/cshift0_i2.c index 8fc9d125d595..07b975a34236 100644 --- a/libgfortran/generated/cshift0_i2.c +++ b/libgfortran/generated/cshift0_i2.c @@ -111,10 +111,10 @@ cshift0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_INTEGER_2); + rstride[0] = sizeof (GFC_INTEGER_2); + roffset = sizeof (GFC_INTEGER_2); + soffset = sizeof (GFC_INTEGER_2); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_INTEGER_2); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_INTEGER_2); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_INTEGER_2); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_INTEGER_2); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_INTEGER_2) && roffset == sizeof (GFC_INTEGER_2)) { size_t len1 = shift * sizeof (GFC_INTEGER_2); size_t len2 = (len - shift) * sizeof (GFC_INTEGER_2); @@ -190,7 +190,7 @@ cshift0_i2 (gfc_array_i2 *ret, const gfc_array_i2 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_INTEGER_2 *dest = rptr; - const GFC_INTEGER_2 *src = &sptr[shift * soffset]; + const GFC_INTEGER_2 *src = (const GFC_INTEGER_2 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_i4.c b/libgfortran/generated/cshift0_i4.c index d4165c6708c9..28ca14c35f3b 100644 --- a/libgfortran/generated/cshift0_i4.c +++ b/libgfortran/generated/cshift0_i4.c @@ -111,10 +111,10 @@ cshift0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_INTEGER_4); + rstride[0] = sizeof (GFC_INTEGER_4); + roffset = sizeof (GFC_INTEGER_4); + soffset = sizeof (GFC_INTEGER_4); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_INTEGER_4); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_INTEGER_4); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_INTEGER_4); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_INTEGER_4); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_INTEGER_4) && roffset == sizeof (GFC_INTEGER_4)) { size_t len1 = shift * sizeof (GFC_INTEGER_4); size_t len2 = (len - shift) * sizeof (GFC_INTEGER_4); @@ -190,7 +190,7 @@ cshift0_i4 (gfc_array_i4 *ret, const gfc_array_i4 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_INTEGER_4 *dest = rptr; - const GFC_INTEGER_4 *src = &sptr[shift * soffset]; + const GFC_INTEGER_4 *src = (const GFC_INTEGER_4 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_i8.c b/libgfortran/generated/cshift0_i8.c index ab8905c1fc32..76f6f5aac62b 100644 --- a/libgfortran/generated/cshift0_i8.c +++ b/libgfortran/generated/cshift0_i8.c @@ -111,10 +111,10 @@ cshift0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_INTEGER_8); + rstride[0] = sizeof (GFC_INTEGER_8); + roffset = sizeof (GFC_INTEGER_8); + soffset = sizeof (GFC_INTEGER_8); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_INTEGER_8); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_INTEGER_8); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_INTEGER_8); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_INTEGER_8); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_INTEGER_8) && roffset == sizeof (GFC_INTEGER_8)) { size_t len1 = shift * sizeof (GFC_INTEGER_8); size_t len2 = (len - shift) * sizeof (GFC_INTEGER_8); @@ -190,7 +190,7 @@ cshift0_i8 (gfc_array_i8 *ret, const gfc_array_i8 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_INTEGER_8 *dest = rptr; - const GFC_INTEGER_8 *src = &sptr[shift * soffset]; + const GFC_INTEGER_8 *src = (const GFC_INTEGER_8 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_r10.c b/libgfortran/generated/cshift0_r10.c index cc5a37170e59..7b4406d3bad8 100644 --- a/libgfortran/generated/cshift0_r10.c +++ b/libgfortran/generated/cshift0_r10.c @@ -111,10 +111,10 @@ cshift0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_REAL_10); + rstride[0] = sizeof (GFC_REAL_10); + roffset = sizeof (GFC_REAL_10); + soffset = sizeof (GFC_REAL_10); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_REAL_10); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_REAL_10); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_REAL_10); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_REAL_10); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_REAL_10) && roffset == sizeof (GFC_REAL_10)) { size_t len1 = shift * sizeof (GFC_REAL_10); size_t len2 = (len - shift) * sizeof (GFC_REAL_10); @@ -190,7 +190,7 @@ cshift0_r10 (gfc_array_r10 *ret, const gfc_array_r10 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_REAL_10 *dest = rptr; - const GFC_REAL_10 *src = &sptr[shift * soffset]; + const GFC_REAL_10 *src = (const GFC_REAL_10 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_r16.c b/libgfortran/generated/cshift0_r16.c index 96c58f814be7..fea3900f3368 100644 --- a/libgfortran/generated/cshift0_r16.c +++ b/libgfortran/generated/cshift0_r16.c @@ -111,10 +111,10 @@ cshift0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_REAL_16); + rstride[0] = sizeof (GFC_REAL_16); + roffset = sizeof (GFC_REAL_16); + soffset = sizeof (GFC_REAL_16); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_REAL_16); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_REAL_16); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_REAL_16); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_REAL_16); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_REAL_16) && roffset == sizeof (GFC_REAL_16)) { size_t len1 = shift * sizeof (GFC_REAL_16); size_t len2 = (len - shift) * sizeof (GFC_REAL_16); @@ -190,7 +190,7 @@ cshift0_r16 (gfc_array_r16 *ret, const gfc_array_r16 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_REAL_16 *dest = rptr; - const GFC_REAL_16 *src = &sptr[shift * soffset]; + const GFC_REAL_16 *src = (const GFC_REAL_16 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_r17.c b/libgfortran/generated/cshift0_r17.c index 2ef2c9f25867..e4a056d7d146 100644 --- a/libgfortran/generated/cshift0_r17.c +++ b/libgfortran/generated/cshift0_r17.c @@ -111,10 +111,10 @@ cshift0_r17 (gfc_array_r17 *ret, const gfc_array_r17 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_REAL_17); + rstride[0] = sizeof (GFC_REAL_17); + roffset = sizeof (GFC_REAL_17); + soffset = sizeof (GFC_REAL_17); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_r17 (gfc_array_r17 *ret, const gfc_array_r17 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_REAL_17); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_REAL_17); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_r17 (gfc_array_r17 *ret, const gfc_array_r17 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_REAL_17); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_REAL_17); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_r17 (gfc_array_r17 *ret, const gfc_array_r17 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_REAL_17) && roffset == sizeof (GFC_REAL_17)) { size_t len1 = shift * sizeof (GFC_REAL_17); size_t len2 = (len - shift) * sizeof (GFC_REAL_17); @@ -190,7 +190,7 @@ cshift0_r17 (gfc_array_r17 *ret, const gfc_array_r17 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_REAL_17 *dest = rptr; - const GFC_REAL_17 *src = &sptr[shift * soffset]; + const GFC_REAL_17 *src = (const GFC_REAL_17 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_r4.c b/libgfortran/generated/cshift0_r4.c index c4bdab90ee9a..82f8182a17fa 100644 --- a/libgfortran/generated/cshift0_r4.c +++ b/libgfortran/generated/cshift0_r4.c @@ -111,10 +111,10 @@ cshift0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_REAL_4); + rstride[0] = sizeof (GFC_REAL_4); + roffset = sizeof (GFC_REAL_4); + soffset = sizeof (GFC_REAL_4); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_REAL_4); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_REAL_4); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_REAL_4); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_REAL_4); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_REAL_4) && roffset == sizeof (GFC_REAL_4)) { size_t len1 = shift * sizeof (GFC_REAL_4); size_t len2 = (len - shift) * sizeof (GFC_REAL_4); @@ -190,7 +190,7 @@ cshift0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_REAL_4 *dest = rptr; - const GFC_REAL_4 *src = &sptr[shift * soffset]; + const GFC_REAL_4 *src = (const GFC_REAL_4 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) { diff --git a/libgfortran/generated/cshift0_r8.c b/libgfortran/generated/cshift0_r8.c index d33413554b3b..08da8bb81c73 100644 --- a/libgfortran/generated/cshift0_r8.c +++ b/libgfortran/generated/cshift0_r8.c @@ -111,10 +111,10 @@ cshift0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *array, ptrdiff_t shift, bn = cshift(a,sh*n1*n2,1) we can used a more blocked algorithm for dim>1. */ - sstride[0] = 1; - rstride[0] = 1; - roffset = 1; - soffset = 1; + sstride[0] = sizeof (GFC_REAL_8); + rstride[0] = sizeof (GFC_REAL_8); + roffset = sizeof (GFC_REAL_8); + soffset = sizeof (GFC_REAL_8); len = GFC_DESCRIPTOR_STRIDE(array, which) * GFC_DESCRIPTOR_EXTENT(array, which); shift *= GFC_DESCRIPTOR_STRIDE(array, which); @@ -136,10 +136,10 @@ cshift0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *array, ptrdiff_t shift, { roffset = GFC_DESCRIPTOR_STRIDE_BYTES(ret,dim); if (roffset == 0) - roffset = GFC_DESCRIPTOR_SIZE(ret); - soffset = GFC_DESCRIPTOR_STRIDE(array,dim); + roffset = sizeof (GFC_REAL_8); + soffset = GFC_DESCRIPTOR_STRIDE_BYTES(array,dim); if (soffset == 0) - soffset = GFC_DESCRIPTOR_SIZE(array); + soffset = sizeof (GFC_REAL_8); len = GFC_DESCRIPTOR_EXTENT(array,dim); } else @@ -152,9 +152,9 @@ cshift0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *array, ptrdiff_t shift, } } if (sstride[0] == 0) - sstride[0] = GFC_DESCRIPTOR_SIZE(array); + sstride[0] = sizeof (GFC_REAL_8); if (rstride[0] == 0) - rstride[0] = GFC_DESCRIPTOR_SIZE(ret); + rstride[0] = sizeof (GFC_REAL_8); dim = GFC_DESCRIPTOR_RANK (array); } @@ -178,7 +178,7 @@ cshift0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *array, ptrdiff_t shift, /* If elements are contiguous, perform the operation in two block moves. */ - if (soffset == 1 && roffset == 1) + if (soffset == sizeof (GFC_REAL_8) && roffset == sizeof (GFC_REAL_8)) { size_t len1 = shift * sizeof (GFC_REAL_8); size_t len2 = (len - shift) * sizeof (GFC_REAL_8); @@ -190,7 +190,7 @@ cshift0_r8 (gfc_array_r8 *ret, const gfc_array_r8 *array, ptrdiff_t shift, /* Otherwise, we will have to perform the copy one element at a time. */ GFC_REAL_8 *dest = rptr; - const GFC_REAL_8 *src = &sptr[shift * soffset]; + const GFC_REAL_8 *src = (const GFC_REAL_8 *) (((char*)sptr) + shift * soffset); for (n = 0; n < len - shift; n++) {
