diff options
65 files changed, 220 insertions, 121 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 50dde4e40e0..ec9792aebfc 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,5 +1,14 @@ 2004-12-06 Richard Henderson <rth@redhat.com> + * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c, + intrinsics/pack_generic.c, intrinsics/string_intrinsics.c, + intrinsics/transpose_generic.c, m4/ifunction.m4, m4/matmul.m4, + m4/matmull.m4, m4/transpose.m4: Use internal_malloc_size instead + of internal_malloc. + * generated/*: Rebuild. + +2004-12-06 Richard Henderson <rth@redhat.com> + * intrinsics/c99_functions.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c, intrinsics/exit.c, intrinsics/flush.c, intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c, diff --git a/libgfortran/generated/all_l4.c b/libgfortran/generated/all_l4.c index 671684fa57f..5a517c1c330 100644 --- a/libgfortran/generated/all_l4.c +++ b/libgfortran/generated/all_l4.c @@ -75,8 +75,10 @@ __all_l4 (gfc_array_l4 * retarray, gfc_array_l4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_LOGICAL_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_LOGICAL_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/all_l8.c b/libgfortran/generated/all_l8.c index 3f418ccc45f..a58396381a5 100644 --- a/libgfortran/generated/all_l8.c +++ b/libgfortran/generated/all_l8.c @@ -75,8 +75,10 @@ __all_l8 (gfc_array_l8 * retarray, gfc_array_l8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_LOGICAL_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_LOGICAL_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/any_l4.c b/libgfortran/generated/any_l4.c index 64cd6757a48..93beea72696 100644 --- a/libgfortran/generated/any_l4.c +++ b/libgfortran/generated/any_l4.c @@ -75,8 +75,10 @@ __any_l4 (gfc_array_l4 * retarray, gfc_array_l4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_LOGICAL_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_LOGICAL_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/any_l8.c b/libgfortran/generated/any_l8.c index c9f418dcd07..bc0ede896a7 100644 --- a/libgfortran/generated/any_l8.c +++ b/libgfortran/generated/any_l8.c @@ -75,8 +75,10 @@ __any_l8 (gfc_array_l8 * retarray, gfc_array_l8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_LOGICAL_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_LOGICAL_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/count_4_l4.c b/libgfortran/generated/count_4_l4.c index 626ebf944e7..9c33c2e6d0d 100644 --- a/libgfortran/generated/count_4_l4.c +++ b/libgfortran/generated/count_4_l4.c @@ -75,8 +75,10 @@ __count_4_l4 (gfc_array_i4 * retarray, gfc_array_l4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/count_4_l8.c b/libgfortran/generated/count_4_l8.c index 2db569aac50..288aa3ad706 100644 --- a/libgfortran/generated/count_4_l8.c +++ b/libgfortran/generated/count_4_l8.c @@ -75,8 +75,10 @@ __count_4_l8 (gfc_array_i4 * retarray, gfc_array_l8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/count_8_l4.c b/libgfortran/generated/count_8_l4.c index dadbc96fb4e..bf83d3e3c18 100644 --- a/libgfortran/generated/count_8_l4.c +++ b/libgfortran/generated/count_8_l4.c @@ -75,8 +75,10 @@ __count_8_l4 (gfc_array_i8 * retarray, gfc_array_l4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/count_8_l8.c b/libgfortran/generated/count_8_l8.c index d453e01e45b..ef05c6db7b8 100644 --- a/libgfortran/generated/count_8_l8.c +++ b/libgfortran/generated/count_8_l8.c @@ -75,8 +75,10 @@ __count_8_l8 (gfc_array_i8 * retarray, gfc_array_l8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c index fd265d8b5b1..19e4f239cca 100644 --- a/libgfortran/generated/matmul_c4.c +++ b/libgfortran/generated/matmul_c4.c @@ -86,7 +86,8 @@ __matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_COMPLEX_4) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_COMPLEX_4) * size0 (retarray)); retarray->base = 0; } @@ -199,4 +200,3 @@ __matmul_c4 (gfc_array_c4 * retarray, gfc_array_c4 * a, gfc_array_c4 * b) dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c index bc51e4a9db3..fb422cba5f4 100644 --- a/libgfortran/generated/matmul_c8.c +++ b/libgfortran/generated/matmul_c8.c @@ -86,7 +86,8 @@ __matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_COMPLEX_8) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_COMPLEX_8) * size0 (retarray)); retarray->base = 0; } @@ -199,4 +200,3 @@ __matmul_c8 (gfc_array_c8 * retarray, gfc_array_c8 * a, gfc_array_c8 * b) dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c index 7b8cfbdd995..e5f534a169d 100644 --- a/libgfortran/generated/matmul_i4.c +++ b/libgfortran/generated/matmul_i4.c @@ -86,7 +86,8 @@ __matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) * size0 (retarray)); retarray->base = 0; } @@ -199,4 +200,3 @@ __matmul_i4 (gfc_array_i4 * retarray, gfc_array_i4 * a, gfc_array_i4 * b) dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c index c84c0241301..88bbf7a3388 100644 --- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.c @@ -86,7 +86,8 @@ __matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) * size0 (retarray)); retarray->base = 0; } @@ -199,4 +200,3 @@ __matmul_i8 (gfc_array_i8 * retarray, gfc_array_i8 * a, gfc_array_i8 * b) dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/generated/matmul_l4.c b/libgfortran/generated/matmul_l4.c index 80e64823675..1af2eb0c6f8 100644 --- a/libgfortran/generated/matmul_l4.c +++ b/libgfortran/generated/matmul_l4.c @@ -76,7 +76,8 @@ __matmul_l4 (gfc_array_l4 * retarray, gfc_array_l4 * a, gfc_array_l4 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_LOGICAL_4) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_LOGICAL_4) * size0 (retarray)); retarray->base = 0; } @@ -178,4 +179,3 @@ __matmul_l4 (gfc_array_l4 * retarray, gfc_array_l4 * a, gfc_array_l4 * b) dest += rystride - (rxstride * xcount); } } - diff --git a/libgfortran/generated/matmul_l8.c b/libgfortran/generated/matmul_l8.c index c842146e2d0..d6d85a1e288 100644 --- a/libgfortran/generated/matmul_l8.c +++ b/libgfortran/generated/matmul_l8.c @@ -76,7 +76,8 @@ __matmul_l8 (gfc_array_l8 * retarray, gfc_array_l4 * a, gfc_array_l4 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_LOGICAL_8) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_LOGICAL_8) * size0 (retarray)); retarray->base = 0; } @@ -178,4 +179,3 @@ __matmul_l8 (gfc_array_l8 * retarray, gfc_array_l4 * a, gfc_array_l4 * b) dest += rystride - (rxstride * xcount); } } - diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c index 6896a2e9bef..91417ccd1cd 100644 --- a/libgfortran/generated/matmul_r4.c +++ b/libgfortran/generated/matmul_r4.c @@ -86,7 +86,8 @@ __matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_REAL_4) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_4) * size0 (retarray)); retarray->base = 0; } @@ -199,4 +200,3 @@ __matmul_r4 (gfc_array_r4 * retarray, gfc_array_r4 * a, gfc_array_r4 * b) dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c index f0fc1a64a85..2fc3fed4be3 100644 --- a/libgfortran/generated/matmul_r8.c +++ b/libgfortran/generated/matmul_r8.c @@ -86,7 +86,8 @@ __matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b) retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (GFC_REAL_8) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_8) * size0 (retarray)); retarray->base = 0; } @@ -199,4 +200,3 @@ __matmul_r8 (gfc_array_r8 * retarray, gfc_array_r8 * a, gfc_array_r8 * b) dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/generated/maxloc1_4_i4.c b/libgfortran/generated/maxloc1_4_i4.c index f2a3718482a..2369e77cc8b 100644 --- a/libgfortran/generated/maxloc1_4_i4.c +++ b/libgfortran/generated/maxloc1_4_i4.c @@ -77,8 +77,10 @@ __maxloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_4_i8.c b/libgfortran/generated/maxloc1_4_i8.c index 25a93bae5e5..36860c2ea0c 100644 --- a/libgfortran/generated/maxloc1_4_i8.c +++ b/libgfortran/generated/maxloc1_4_i8.c @@ -77,8 +77,10 @@ __maxloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_4_r4.c b/libgfortran/generated/maxloc1_4_r4.c index 5dbf0e6442e..6d550d55149 100644 --- a/libgfortran/generated/maxloc1_4_r4.c +++ b/libgfortran/generated/maxloc1_4_r4.c @@ -77,8 +77,10 @@ __maxloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_4_r8.c b/libgfortran/generated/maxloc1_4_r8.c index 90b81865128..07a9ecad815 100644 --- a/libgfortran/generated/maxloc1_4_r8.c +++ b/libgfortran/generated/maxloc1_4_r8.c @@ -77,8 +77,10 @@ __maxloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_8_i4.c b/libgfortran/generated/maxloc1_8_i4.c index a705e79d794..79142592cfb 100644 --- a/libgfortran/generated/maxloc1_8_i4.c +++ b/libgfortran/generated/maxloc1_8_i4.c @@ -77,8 +77,10 @@ __maxloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_8_i8.c b/libgfortran/generated/maxloc1_8_i8.c index 5edd7d480a5..46a7561089a 100644 --- a/libgfortran/generated/maxloc1_8_i8.c +++ b/libgfortran/generated/maxloc1_8_i8.c @@ -77,8 +77,10 @@ __maxloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_8_r4.c b/libgfortran/generated/maxloc1_8_r4.c index 5476736e205..1ab1be85a95 100644 --- a/libgfortran/generated/maxloc1_8_r4.c +++ b/libgfortran/generated/maxloc1_8_r4.c @@ -77,8 +77,10 @@ __maxloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxloc1_8_r8.c b/libgfortran/generated/maxloc1_8_r8.c index 0fba535c975..b221baae4c3 100644 --- a/libgfortran/generated/maxloc1_8_r8.c +++ b/libgfortran/generated/maxloc1_8_r8.c @@ -77,8 +77,10 @@ __maxloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxval_i4.c b/libgfortran/generated/maxval_i4.c index 90fc202331d..8d37dfee18a 100644 --- a/libgfortran/generated/maxval_i4.c +++ b/libgfortran/generated/maxval_i4.c @@ -76,8 +76,10 @@ __maxval_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxval_i8.c b/libgfortran/generated/maxval_i8.c index 9746503707b..bdb33c9ce65 100644 --- a/libgfortran/generated/maxval_i8.c +++ b/libgfortran/generated/maxval_i8.c @@ -76,8 +76,10 @@ __maxval_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxval_r4.c b/libgfortran/generated/maxval_r4.c index de999ab390e..78e83dcbe78 100644 --- a/libgfortran/generated/maxval_r4.c +++ b/libgfortran/generated/maxval_r4.c @@ -76,8 +76,10 @@ __maxval_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/maxval_r8.c b/libgfortran/generated/maxval_r8.c index fa357b443fa..e3c74539aed 100644 --- a/libgfortran/generated/maxval_r8.c +++ b/libgfortran/generated/maxval_r8.c @@ -76,8 +76,10 @@ __maxval_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_4_i4.c b/libgfortran/generated/minloc1_4_i4.c index be9ae2e452d..ce739168dfc 100644 --- a/libgfortran/generated/minloc1_4_i4.c +++ b/libgfortran/generated/minloc1_4_i4.c @@ -77,8 +77,10 @@ __minloc1_4_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_4_i8.c b/libgfortran/generated/minloc1_4_i8.c index 2f17baacbf0..55a249beacb 100644 --- a/libgfortran/generated/minloc1_4_i8.c +++ b/libgfortran/generated/minloc1_4_i8.c @@ -77,8 +77,10 @@ __minloc1_4_i8 (gfc_array_i4 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_4_r4.c b/libgfortran/generated/minloc1_4_r4.c index 7f3449f716b..50adeb33cba 100644 --- a/libgfortran/generated/minloc1_4_r4.c +++ b/libgfortran/generated/minloc1_4_r4.c @@ -77,8 +77,10 @@ __minloc1_4_r4 (gfc_array_i4 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_4_r8.c b/libgfortran/generated/minloc1_4_r8.c index 226d7271c06..aafb578cc2e 100644 --- a/libgfortran/generated/minloc1_4_r8.c +++ b/libgfortran/generated/minloc1_4_r8.c @@ -77,8 +77,10 @@ __minloc1_4_r8 (gfc_array_i4 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_8_i4.c b/libgfortran/generated/minloc1_8_i4.c index 1d1c3d406aa..5c347dd12b5 100644 --- a/libgfortran/generated/minloc1_8_i4.c +++ b/libgfortran/generated/minloc1_8_i4.c @@ -77,8 +77,10 @@ __minloc1_8_i4 (gfc_array_i8 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_8_i8.c b/libgfortran/generated/minloc1_8_i8.c index f7b46c17cf7..c8811f36ffa 100644 --- a/libgfortran/generated/minloc1_8_i8.c +++ b/libgfortran/generated/minloc1_8_i8.c @@ -77,8 +77,10 @@ __minloc1_8_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_8_r4.c b/libgfortran/generated/minloc1_8_r4.c index d71d05621ea..81ba1672116 100644 --- a/libgfortran/generated/minloc1_8_r4.c +++ b/libgfortran/generated/minloc1_8_r4.c @@ -77,8 +77,10 @@ __minloc1_8_r4 (gfc_array_i8 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minloc1_8_r8.c b/libgfortran/generated/minloc1_8_r8.c index 7de9a2e0377..684eab26565 100644 --- a/libgfortran/generated/minloc1_8_r8.c +++ b/libgfortran/generated/minloc1_8_r8.c @@ -77,8 +77,10 @@ __minloc1_8_r8 (gfc_array_i8 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minval_i4.c b/libgfortran/generated/minval_i4.c index e2e68237601..784645297d9 100644 --- a/libgfortran/generated/minval_i4.c +++ b/libgfortran/generated/minval_i4.c @@ -76,8 +76,10 @@ __minval_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minval_i8.c b/libgfortran/generated/minval_i8.c index 4b7bac6b532..deca048917a 100644 --- a/libgfortran/generated/minval_i8.c +++ b/libgfortran/generated/minval_i8.c @@ -76,8 +76,10 @@ __minval_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minval_r4.c b/libgfortran/generated/minval_r4.c index 8d4e49055be..8990d88b3f2 100644 --- a/libgfortran/generated/minval_r4.c +++ b/libgfortran/generated/minval_r4.c @@ -76,8 +76,10 @@ __minval_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/minval_r8.c b/libgfortran/generated/minval_r8.c index 8300f749681..285e90e016d 100644 --- a/libgfortran/generated/minval_r8.c +++ b/libgfortran/generated/minval_r8.c @@ -76,8 +76,10 @@ __minval_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/product_c4.c b/libgfortran/generated/product_c4.c index c69295123ef..0337ec61c0e 100644 --- a/libgfortran/generated/product_c4.c +++ b/libgfortran/generated/product_c4.c @@ -75,8 +75,10 @@ __product_c4 (gfc_array_c4 * retarray, gfc_array_c4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_COMPLEX_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_COMPLEX_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/product_c8.c b/libgfortran/generated/product_c8.c index 68a678586bb..22a26a8e739 100644 --- a/libgfortran/generated/product_c8.c +++ b/libgfortran/generated/product_c8.c @@ -75,8 +75,10 @@ __product_c8 (gfc_array_c8 * retarray, gfc_array_c8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_COMPLEX_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_COMPLEX_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/product_i4.c b/libgfortran/generated/product_i4.c index 889d4c1bd67..c50c07f068b 100644 --- a/libgfortran/generated/product_i4.c +++ b/libgfortran/generated/product_i4.c @@ -75,8 +75,10 @@ __product_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/product_i8.c b/libgfortran/generated/product_i8.c index 74e0459c6b9..0f09a411b51 100644 --- a/libgfortran/generated/product_i8.c +++ b/libgfortran/generated/product_i8.c @@ -75,8 +75,10 @@ __product_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/product_r4.c b/libgfortran/generated/product_r4.c index e18139d6b1b..f68a88ab835 100644 --- a/libgfortran/generated/product_r4.c +++ b/libgfortran/generated/product_r4.c @@ -75,8 +75,10 @@ __product_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/product_r8.c b/libgfortran/generated/product_r8.c index ce29c1a8ca2..0936d181232 100644 --- a/libgfortran/generated/product_r8.c +++ b/libgfortran/generated/product_r8.c @@ -75,8 +75,10 @@ __product_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/sum_c4.c b/libgfortran/generated/sum_c4.c index 36e20e2e81c..6507de88797 100644 --- a/libgfortran/generated/sum_c4.c +++ b/libgfortran/generated/sum_c4.c @@ -75,8 +75,10 @@ __sum_c4 (gfc_array_c4 * retarray, gfc_array_c4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_COMPLEX_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_COMPLEX_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/sum_c8.c b/libgfortran/generated/sum_c8.c index 971c597341e..bc2d045e667 100644 --- a/libgfortran/generated/sum_c8.c +++ b/libgfortran/generated/sum_c8.c @@ -75,8 +75,10 @@ __sum_c8 (gfc_array_c8 * retarray, gfc_array_c8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_COMPLEX_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_COMPLEX_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/sum_i4.c b/libgfortran/generated/sum_i4.c index 628a07756f4..aac7f482e92 100644 --- a/libgfortran/generated/sum_i4.c +++ b/libgfortran/generated/sum_i4.c @@ -75,8 +75,10 @@ __sum_i4 (gfc_array_i4 * retarray, gfc_array_i4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/sum_i8.c b/libgfortran/generated/sum_i8.c index 536719dd7e4..e9a539d992d 100644 --- a/libgfortran/generated/sum_i8.c +++ b/libgfortran/generated/sum_i8.c @@ -75,8 +75,10 @@ __sum_i8 (gfc_array_i8 * retarray, gfc_array_i8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_INTEGER_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_INTEGER_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/sum_r4.c b/libgfortran/generated/sum_r4.c index 611a1131739..11b5c494483 100644 --- a/libgfortran/generated/sum_r4.c +++ b/libgfortran/generated/sum_r4.c @@ -75,8 +75,10 @@ __sum_r4 (gfc_array_r4 * retarray, gfc_array_r4 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_4) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_4) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/sum_r8.c b/libgfortran/generated/sum_r8.c index bdc93e0e47a..95272fb1f16 100644 --- a/libgfortran/generated/sum_r8.c +++ b/libgfortran/generated/sum_r8.c @@ -75,8 +75,10 @@ __sum_r8 (gfc_array_r8 * retarray, gfc_array_r8 *array, index_type *pdim) retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (GFC_REAL_8) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (GFC_REAL_8) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/generated/transpose_i4.c b/libgfortran/generated/transpose_i4.c index 97eb1a0d140..dad2987fca7 100644 --- a/libgfortran/generated/transpose_i4.c +++ b/libgfortran/generated/transpose_i4.c @@ -51,7 +51,7 @@ __transpose_4 (gfc_array_i4 * ret, gfc_array_i4 * source) ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound; ret->dim[1].stride = ret->dim[0].ubound+1; - ret->data = internal_malloc (sizeof (GFC_INTEGER_4) * size0 (ret)); + ret->data = internal_malloc_size (sizeof (GFC_INTEGER_4) * size0 (ret)); ret->base = 0; } diff --git a/libgfortran/generated/transpose_i8.c b/libgfortran/generated/transpose_i8.c index 4c842d48520..84811d0d012 100644 --- a/libgfortran/generated/transpose_i8.c +++ b/libgfortran/generated/transpose_i8.c @@ -51,7 +51,7 @@ __transpose_8 (gfc_array_i8 * ret, gfc_array_i8 * source) ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound; ret->dim[1].stride = ret->dim[0].ubound+1; - ret->data = internal_malloc (sizeof (GFC_INTEGER_8) * size0 (ret)); + ret->data = internal_malloc_size (sizeof (GFC_INTEGER_8) * size0 (ret)); ret->base = 0; } diff --git a/libgfortran/intrinsics/cshift0.c b/libgfortran/intrinsics/cshift0.c index a988827a826..6d7a8018867 100644 --- a/libgfortran/intrinsics/cshift0.c +++ b/libgfortran/intrinsics/cshift0.c @@ -109,7 +109,7 @@ __cshift0 (gfc_array_char * ret, const gfc_array_char * array, { int i; - ret->data = internal_malloc (size * size0 ((array_t *)array)); + ret->data = internal_malloc_size (size * size0 ((array_t *)array)); ret->base = 0; ret->dtype = array->dtype; for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++) diff --git a/libgfortran/intrinsics/eoshift0.c b/libgfortran/intrinsics/eoshift0.c index 2f7a0338461..db9dd657200 100644 --- a/libgfortran/intrinsics/eoshift0.c +++ b/libgfortran/intrinsics/eoshift0.c @@ -64,7 +64,7 @@ __eoshift0 (gfc_array_char * ret, const gfc_array_char * array, { int i; - ret->data = internal_malloc (size * size0 ((array_t *)array)); + ret->data = internal_malloc_size (size * size0 ((array_t *)array)); ret->base = 0; ret->dtype = array->dtype; for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++) diff --git a/libgfortran/intrinsics/eoshift2.c b/libgfortran/intrinsics/eoshift2.c index c89c5c59d90..a20da552585 100644 --- a/libgfortran/intrinsics/eoshift2.c +++ b/libgfortran/intrinsics/eoshift2.c @@ -65,7 +65,7 @@ __eoshift2 (gfc_array_char * ret, const gfc_array_char * array, { int i; - ret->data = internal_malloc (size * size0 ((array_t *)array)); + ret->data = internal_malloc_size (size * size0 ((array_t *)array)); ret->base = 0; ret->dtype = array->dtype; for (i = 0; i < GFC_DESCRIPTOR_RANK (array); i++) diff --git a/libgfortran/intrinsics/pack_generic.c b/libgfortran/intrinsics/pack_generic.c index da0bc579827..75a8661ba8f 100644 --- a/libgfortran/intrinsics/pack_generic.c +++ b/libgfortran/intrinsics/pack_generic.c @@ -188,7 +188,7 @@ __pack (gfc_array_char * ret, const gfc_array_char * array, ret->dim[0].ubound = total - 1; ret->dim[0].stride = 1; - ret->data = internal_malloc (size * total); + ret->data = internal_malloc_size (size * total); ret->base = 0; if (total == 0) @@ -325,7 +325,7 @@ __pack_s (gfc_array_char * ret, const gfc_array_char * array, ret->dim[0].lbound = 0; ret->dim[0].ubound = -1; ret->dim[0].stride = 1; - ret->data = internal_malloc (0); + ret->data = internal_malloc_size (0); ret->base = 0; return; @@ -337,7 +337,7 @@ __pack_s (gfc_array_char * ret, const gfc_array_char * array, ret->dim[0].ubound = total - 1; ret->dim[0].stride = 1; - ret->data = internal_malloc (size * total); + ret->data = internal_malloc_size (size * total); ret->base = 0; } diff --git a/libgfortran/intrinsics/string_intrinsics.c b/libgfortran/intrinsics/string_intrinsics.c index 53d9b4e9902..faacaab56f8 100644 --- a/libgfortran/intrinsics/string_intrinsics.c +++ b/libgfortran/intrinsics/string_intrinsics.c @@ -184,7 +184,7 @@ string_trim (GFC_INTEGER_4 * len, void ** dest, GFC_INTEGER_4 slen, if (*len > 0) { /* Allocate space for result string. */ - *dest = internal_malloc (*len); + *dest = internal_malloc_size (*len); /* copy string if necessary. */ memmove (*dest, src, *len); diff --git a/libgfortran/intrinsics/transpose_generic.c b/libgfortran/intrinsics/transpose_generic.c index ad08ea7893a..55d2729aea9 100644 --- a/libgfortran/intrinsics/transpose_generic.c +++ b/libgfortran/intrinsics/transpose_generic.c @@ -56,7 +56,7 @@ __transpose (gfc_array_char * ret, gfc_array_char * source) ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound; ret->dim[1].stride = ret->dim[0].ubound+1; - ret->data = internal_malloc (size * size0 ((array_t*)ret)); + ret->data = internal_malloc_size (size * size0 ((array_t*)ret)); ret->base = 0; } diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index 14bd0a63997..93b31973e1c 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -69,8 +69,10 @@ define(START_ARRAY_FUNCTION, retarray->dim[n].stride = retarray->dim[n-1].stride * extent[n-1]; } - retarray->data = internal_malloc (sizeof (rtype_name) * - (retarray->dim[rank-1].stride * extent[rank-1])); + retarray->data + = internal_malloc_size (sizeof (rtype_name) + * retarray->dim[rank-1].stride + * extent[rank-1]); retarray->base = 0; } diff --git a/libgfortran/m4/matmul.m4 b/libgfortran/m4/matmul.m4 index 0602be69061..9af77ceea50 100644 --- a/libgfortran/m4/matmul.m4 +++ b/libgfortran/m4/matmul.m4 @@ -87,7 +87,8 @@ void retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (rtype_name) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (rtype_name) * size0 (retarray)); retarray->base = 0; } @@ -201,4 +202,3 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl dest[x*rxstride + y*rystride] += abase[x*axstride + n*aystride] * bbase[n*bxstride + y*bystride]; } } - diff --git a/libgfortran/m4/matmull.m4 b/libgfortran/m4/matmull.m4 index 804127ec005..0d66a42a4e2 100644 --- a/libgfortran/m4/matmull.m4 +++ b/libgfortran/m4/matmull.m4 @@ -77,7 +77,8 @@ void retarray->dim[1].stride = retarray->dim[0].ubound+1; } - retarray->data = internal_malloc (sizeof (rtype_name) * size0 (retarray)); + retarray->data + = internal_malloc_size (sizeof (rtype_name) * size0 (retarray)); retarray->base = 0; } @@ -180,4 +181,3 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl dest += rystride - (rxstride * xcount); } } - diff --git a/libgfortran/m4/transpose.m4 b/libgfortran/m4/transpose.m4 index 5fd6acfb228..55f4b572917 100644 --- a/libgfortran/m4/transpose.m4 +++ b/libgfortran/m4/transpose.m4 @@ -52,7 +52,7 @@ void ret->dim[1].ubound = source->dim[0].ubound - source->dim[0].lbound; ret->dim[1].stride = ret->dim[0].ubound+1; - ret->data = internal_malloc (sizeof (rtype_name) * size0 (ret)); + ret->data = internal_malloc_size (sizeof (rtype_name) * size0 (ret)); ret->base = 0; } |