@@ -339,7 +339,7 @@ matmul_c10_avx (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_c10_avx (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_c10_avx2 (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_c10_avx2 (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_c10_avx512f (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_c10_avx512f (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_c10_vanilla (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_c10_vanilla (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_c10 (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_c10 (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_c16_avx (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_c16_avx (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_c16_avx2 (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_c16_avx2 (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_c16_avx512f (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_c16_avx512f (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_c16_vanilla (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_c16_vanilla (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_c16 (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_c16 (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_c17_avx (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_c17_avx (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_c17_avx2 (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_c17_avx2 (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_c17_avx512f (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_c17_avx512f (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_c17_vanilla (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_c17_vanilla (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_c17 (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_c17 (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_c4_avx (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_c4_avx (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_c4_avx2 (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_c4_avx2 (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_c4_avx512f (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_c4_avx512f (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_c4_vanilla (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_c4_vanilla (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_c4 (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_c4 (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_c8_avx (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_c8_avx (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_c8_avx2 (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_c8_avx2 (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_c8_avx512f (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_c8_avx512f (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_c8_vanilla (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_c8_vanilla (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_c8 (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_c8 (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_i1_avx2 (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_i1_avx2 (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_i1_avx512f (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_i1_avx512f (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_i1_vanilla (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_i1_vanilla (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_i1 (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_i1 (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_i16_avx (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_i16_avx (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_i16_avx2 (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_i16_avx2 (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_i16_avx512f (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_i16_avx512f (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_i16_vanilla (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_i16_vanilla (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_i16 (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_i16 (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_i2_avx (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_i2_avx (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_i2_avx2 (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_i2_avx2 (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_i2_avx512f (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_i2_avx512f (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_i2_vanilla (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_i2_vanilla (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_i2 (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_i2 (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_i8_avx (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_i8_avx (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_i8_avx2 (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_i8_avx2 (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_i8_avx512f (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_i8_avx512f (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_i8_vanilla (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_i8_vanilla (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_i8 (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_i8 (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_r10_avx (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_r10_avx (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_r10_avx2 (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_r10_avx2 (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_r10_avx512f (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_r10_avx512f (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_r10_vanilla (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_r10_vanilla (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_r10 (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_r10 (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_r16_avx (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_r16_avx (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_r16_avx2 (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_r16_avx2 (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_r16_avx512f (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_r16_avx512f (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_r16_vanilla (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_r16_vanilla (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_r16 (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_r16 (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_r17_avx (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_r17_avx (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_r17_avx2 (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_r17_avx2 (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_r17_avx512f (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_r17_avx512f (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_r17_vanilla (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_r17_vanilla (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_r17 (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_r17 (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_r4_avx (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_r4_avx (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_r4_avx2 (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_r4_avx2 (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_r4_avx512f (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_r4_avx512f (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_r4_vanilla (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_r4_vanilla (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_r4 (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_r4 (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -339,7 +339,7 @@ matmul_r8_avx (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -550,7 +550,7 @@ matmul_r8_avx (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -908,7 +908,7 @@ matmul_r8_avx2 (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -1119,7 +1119,7 @@ matmul_r8_avx2 (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -1477,7 +1477,7 @@ matmul_r8_avx512f (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -1688,7 +1688,7 @@ matmul_r8_avx512f (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2060,7 +2060,7 @@ matmul_r8_vanilla (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -2271,7 +2271,7 @@ matmul_r8_vanilla (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -2702,7 +2702,7 @@ matmul_r8 (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -2913,7 +2913,7 @@ matmul_r8 (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_c10_avx128_fma3 (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_c10_avx128_fma3 (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_c10_avx128_fma4 (gfc_array_c10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_10));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_c10_avx128_fma4 (gfc_array_c10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_c16_avx128_fma3 (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_c16_avx128_fma3 (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_c16_avx128_fma4 (gfc_array_c16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_16));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_c16_avx128_fma4 (gfc_array_c16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_c17_avx128_fma3 (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_c17_avx128_fma3 (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_c17_avx128_fma4 (gfc_array_c17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_17));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_c17_avx128_fma4 (gfc_array_c17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_c4_avx128_fma3 (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_c4_avx128_fma3 (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_c4_avx128_fma4 (gfc_array_c4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_4));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_c4_avx128_fma4 (gfc_array_c4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_c8_avx128_fma3 (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_c8_avx128_fma3 (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_c8_avx128_fma4 (gfc_array_c8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_COMPLEX_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_COMPLEX_8));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_c8_avx128_fma4 (gfc_array_c8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_i1_avx128_fma3 (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_i1_avx128_fma3 (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_i1_avx128_fma4 (gfc_array_i1 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_1));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_1));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_i1_avx128_fma4 (gfc_array_i1 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_i16_avx128_fma3 (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_i16_avx128_fma3 (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_i16_avx128_fma4 (gfc_array_i16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_16));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_i16_avx128_fma4 (gfc_array_i16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_i2_avx128_fma3 (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_i2_avx128_fma3 (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_i2_avx128_fma4 (gfc_array_i2 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_2));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_2));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_i2_avx128_fma4 (gfc_array_i2 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_i4_avx128_fma3 (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_i4_avx128_fma3 (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_i4_avx128_fma4 (gfc_array_i4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_4));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_i4_avx128_fma4 (gfc_array_i4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_i8_avx128_fma3 (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_i8_avx128_fma3 (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_i8_avx128_fma4 (gfc_array_i8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_INTEGER_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_INTEGER_8));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_i8_avx128_fma4 (gfc_array_i8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_r10_avx128_fma3 (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_r10_avx128_fma3 (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_r10_avx128_fma4 (gfc_array_r10 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_10));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_10));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_r10_avx128_fma4 (gfc_array_r10 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_r16_avx128_fma3 (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_r16_avx128_fma3 (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_r16_avx128_fma4 (gfc_array_r16 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_16));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_16));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_r16_avx128_fma4 (gfc_array_r16 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_r17_avx128_fma3 (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_r17_avx128_fma3 (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_r17_avx128_fma4 (gfc_array_r17 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_17));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_17));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_r17_avx128_fma4 (gfc_array_r17 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_r4_avx128_fma3 (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_r4_avx128_fma3 (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_r4_avx128_fma4 (gfc_array_r4 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_4));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_4));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_r4_avx128_fma4 (gfc_array_r4 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -304,7 +304,7 @@ matmul_r8_avx128_fma3 (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -515,7 +515,7 @@ matmul_r8_avx128_fma3 (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -874,7 +874,7 @@ matmul_r8_avx128_fma4 (gfc_array_r8 * const restrict retarray,
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof(GFC_REAL_8));
+ t1 = xmalloc (t1_dim * sizeof(GFC_REAL_8));
/* Start turning the crank. */
i1 = n;
@@ -1085,7 +1085,7 @@ matmul_r8_avx128_fma4 (gfc_array_r8 * const restrict retarray,
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -78,7 +78,7 @@ access_func (char *name, char *mode, gfc_charlen_type name_len,
/* And make the call to access(). */
int res = (access (path, m) == 0 ? 0 : errno);
- free (path);
+ xfree (path);
return res;
}
#endif
@@ -46,7 +46,7 @@ chdir_i4_sub (char *dir, GFC_INTEGER_4 *status, gfc_charlen_type dir_len)
char *str = fc_strdup (dir, dir_len);
val = chdir (str);
- free (str);
+ xfree (str);
if (status != NULL)
*status = (val == 0) ? 0 : errno;
@@ -63,7 +63,7 @@ chdir_i8_sub (char *dir, GFC_INTEGER_8 *status, gfc_charlen_type dir_len)
char *str = fc_strdup (dir, dir_len);
val = chdir (str);
- free (str);
+ xfree (str);
if (status != NULL)
*status = (val == 0) ? 0 : errno;
@@ -487,7 +487,7 @@ chmod_func (char *name, char *mode, gfc_charlen_type name_len,
{
char *cname = fc_strdup (name, name_len);
int ret = chmod_internal (cname, mode, mode_len);
- free (cname);
+ xfree (cname);
return ret;
}
@@ -289,7 +289,7 @@ secnds (GFC_REAL_4 *x)
date_and_time (NULL, NULL, NULL, avalues, 0, 0, 0);
- free (avalues);
+ xfree (avalues);
temp1 = 3600.0 * (GFC_REAL_4)values[4] +
60.0 * (GFC_REAL_4)values[5] +
@@ -55,7 +55,7 @@ PREFIX(getenv) (char * name, char * value, gfc_charlen_type name_len,
res = getenv(name_nt);
- free (name_nt);
+ xfree (name_nt);
/* If res is NULL, it means that the environment variable didn't
exist, so just return. */
@@ -121,7 +121,7 @@ get_environment_variable_i4 (char *name, char *value, GFC_INTEGER_4 *length,
res = getenv(name_nt);
- free (name_nt);
+ xfree (name_nt);
if (res == NULL)
stat = GFC_NAME_DOES_NOT_EXIST;
@@ -162,7 +162,7 @@ execute_command_line (const char *command, bool wait, int *exitstat,
}
}
- free (cmd);
+ xfree (cmd);
/* Now copy back to the Fortran string if needed. */
if (cmdstat && *cmdstat > EXEC_NOERROR && cmdmsg)
@@ -61,7 +61,7 @@ getcwd_i4_sub (char *cwd, GFC_INTEGER_4 *status, gfc_charlen_type cwd_len)
}
else
err = errno;
- free (buf);
+ xfree (buf);
}
else
err = errno;
@@ -113,7 +113,7 @@ PREFIX(getlog) (char * login, gfc_charlen_type login_len)
cleanup:
#if defined (HAVE_POSIX_GETPWUID_R) && defined(HAVE_GETEUID)
- free (buf);
+ xfree (buf);
#else
;
#endif
@@ -50,8 +50,8 @@ link_internal (char *path1, char *path2, gfc_charlen_type path1_len,
val = link (str1, str2);
- free (str1);
- free (str2);
+ xfree (str1);
+ xfree (str2);
return ((val == 0) ? 0 : errno);
}
@@ -34,7 +34,7 @@ move_alloc (gfc_array_char * from, gfc_array_char * to)
{
int i;
- free (to->base_addr);
+ xfree (to->base_addr);
for (i = 0; i < GFC_DESCRIPTOR_RANK (from); i++)
{
@@ -38,6 +38,6 @@ perror_sub (char *string, gfc_charlen_type string_len)
{
char *str = fc_strdup (string, string_len);
perror (str);
- free (str);
+ xfree (str);
}
iexport(perror_sub);
@@ -1039,7 +1039,7 @@ constructor_random (void)
__GTHREAD_MUTEX_INIT_FUNCTION (&random_lock);
#endif
if (__gthread_active_p ())
- __gthread_key_create (&rand_state_key, &free);
+ __gthread_key_create (&rand_state_key, &xfree);
}
#endif
@@ -35,8 +35,8 @@ rename_internal (char *path1, char *path2, gfc_charlen_type path1_len,
char *str1 = fc_strdup (path1, path1_len);
char *str2 = fc_strdup (path2, path2_len);
int val = rename (str1, str2);
- free (str1);
- free (str2);
+ xfree (str1);
+ xfree (str2);
return ((val == 0) ? 0 : errno);
}
@@ -76,7 +76,7 @@ stat_i4_sub_0 (char *name, gfc_array_i4 *sarray, GFC_INTEGER_4 *status,
#endif
val = stat(str, &sb);
- free (str);
+ xfree (str);
if (val == 0)
{
@@ -193,7 +193,7 @@ stat_i8_sub_0 (char *name, gfc_array_i8 *sarray, GFC_INTEGER_8 *status,
#endif
val = stat(str, &sb);
- free (str);
+ xfree (str);
if (val == 0)
{
@@ -43,8 +43,8 @@ symlnk_internal (char *path1, char *path2, gfc_charlen_type path1_len,
char *str1 = fc_strdup (path1, path1_len);
char *str2 = fc_strdup (path2, path2_len);
int val = symlink (str1, str2);
- free (str1);
- free (str2);
+ xfree (str1);
+ xfree (str2);
return ((val == 0) ? 0 : errno);
}
@@ -39,7 +39,7 @@ system_sub (const char *fcmd, GFC_INTEGER_4 *status, gfc_charlen_type cmd_len)
flush_all_units();
stat = system (cmd);
- free (cmd);
+ xfree (cmd);
if (status)
*status = stat;
}
@@ -50,7 +50,7 @@ unlink_i4_sub (char *name, GFC_INTEGER_4 *status, gfc_charlen_type name_len)
stat = unlink (str);
- free (str);
+ xfree (str);
if (status != NULL)
*status = (stat == 0) ? stat : errno;
@@ -72,7 +72,7 @@ update_pdt (st_parameter_dt **old, st_parameter_dt *new) {
temp = *old;
*old = new;
if (temp)
- free (temp);
+ xfree (temp);
}
/* Destroy an adv_cond structure. */
@@ -107,7 +107,7 @@ async_io (void *arg)
while (ctq)
{
if (prev)
- free (prev);
+ xfree (prev);
prev = ctq;
if (!au->error.has_error)
{
@@ -150,7 +150,7 @@ async_io (void *arg)
transfer_array_inner (au->pdt, ctq->arg.array.desc,
ctq->arg.array.kind,
ctq->arg.array.charlen);
- free (ctq->arg.array.desc);
+ xfree (ctq->arg.array.desc);
break;
case AIO_CLOSE:
@@ -195,7 +195,7 @@ async_io (void *arg)
au->head = NULL;
au->empty = 1;
SIGNAL (&au->emptysignal);
- free (ctq);
+ xfree (ctq);
UNLOCK (&au->lock);
return NULL;
}
@@ -212,7 +212,7 @@ free_async_unit (async_unit *au)
destroy_adv_cond (&au->emptysignal);
destroy_adv_cond (&au->id.done);
T_ERROR (__gthread_mutex_destroy, &au->lock);
- free (au);
+ xfree (au);
}
/* Initialize an adv_cond structure. */
@@ -264,7 +264,7 @@ init_async_unit (gfc_unit *u)
void
enqueue_transfer (async_unit *au, transfer_args *arg, enum aio_do type)
{
- transfer_queue *tq = calloc (sizeof (transfer_queue), 1);
+ transfer_queue *tq = xcalloc (sizeof (transfer_queue), 1);
tq->arg = *arg;
tq->type = type;
tq->has_id = 0;
@@ -286,7 +286,7 @@ int
enqueue_done_id (async_unit *au, enum aio_do type)
{
int ret;
- transfer_queue *tq = calloc (sizeof (transfer_queue), 1);
+ transfer_queue *tq = xcalloc (sizeof (transfer_queue), 1);
tq->type = type;
tq->has_id = 1;
@@ -310,7 +310,7 @@ enqueue_done_id (async_unit *au, enum aio_do type)
void
enqueue_done (async_unit *au, enum aio_do type)
{
- transfer_queue *tq = calloc (sizeof (transfer_queue), 1);
+ transfer_queue *tq = xcalloc (sizeof (transfer_queue), 1);
tq->type = type;
tq->has_id = 0;
LOCK (&au->lock);
@@ -330,7 +330,7 @@ enqueue_done (async_unit *au, enum aio_do type)
void
enqueue_close (async_unit *au)
{
- transfer_queue *tq = calloc (sizeof (transfer_queue), 1);
+ transfer_queue *tq = xcalloc (sizeof (transfer_queue), 1);
tq->type = AIO_CLOSE;
LOCK (&au->lock);
@@ -138,7 +138,7 @@
#define MUTEX_DEBUG_ADD(mutex) do { \
aio_lock_debug *n; \
- n = malloc (sizeof(aio_lock_debug)); \
+ n = xmalloc (sizeof(aio_lock_debug)); \
n->prev = TAIL_DEBUG_QUEUE; \
if (n->prev) \
n->prev->next = n; \
@@ -169,7 +169,7 @@
if (curr == aio_debug_head) \
aio_debug_head = NULL; \
} \
- free (curr); \
+ xfree (curr); \
} \
INTERN_UNLOCK (&debug_queue_lock); \
INTERN_UNLOCK (mutex); \
@@ -92,7 +92,7 @@ st_close (st_parameter_close *clp)
generate_error (&clp->common, LIBERROR_BAD_OPTION,
"Can't KEEP a scratch file on CLOSE");
#if !HAVE_UNLINK_OPEN_FILE
- path = strdup (u->filename);
+ path = xstrdup (u->filename);
#endif
}
else
@@ -110,7 +110,7 @@ st_close (st_parameter_close *clp)
generate_error (&clp->common, LIBERROR_OS,
"File cannot be deleted");
#else
- path = strdup (u->filename);
+ path = xstrdup (u->filename);
#endif
}
}
@@ -124,7 +124,7 @@ st_close (st_parameter_close *clp)
if (remove (path))
generate_error (&clp->common, LIBERROR_OS,
"File cannot be deleted");
- free (path);
+ xfree (path);
}
#endif
}
@@ -50,8 +50,8 @@ fbuf_destroy (gfc_unit *u)
{
if (u->fbuf == NULL)
return;
- free (u->fbuf->buf);
- free (u->fbuf);
+ xfree (u->fbuf->buf);
+ xfree (u->fbuf);
u->fbuf = NULL;
}
@@ -65,7 +65,7 @@ free_format_hash_table (gfc_unit *u)
if (u->format_hash_table[i].hashed_fmt != NULL)
{
free_format_data (u->format_hash_table[i].hashed_fmt);
- free (u->format_hash_table[i].key);
+ xfree (u->format_hash_table[i].key);
}
u->format_hash_table[i].key = NULL;
u->format_hash_table[i].key_len = 0;
@@ -145,7 +145,7 @@ save_parsed_format (st_parameter_dt *dtp)
free_format_data (u->format_hash_table[hash].hashed_fmt);
u->format_hash_table[hash].hashed_fmt = NULL;
- free (u->format_hash_table[hash].key);
+ xfree (u->format_hash_table[hash].key);
u->format_hash_table[hash].key = dtp->format;
u->format_hash_table[hash].key_len = dtp->format_len;
@@ -247,7 +247,7 @@ free_format (st_parameter_dt *dtp)
{
if ((dtp->common.flags & IOPARM_DT_HAS_FORMAT) && dtp->format)
{
- free (dtp->format);
+ xfree (dtp->format);
dtp->format = NULL;
}
}
@@ -270,17 +270,17 @@ free_format_data (format_data *fmt)
if (fnp->format == FMT_DT)
{
if (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist))
- free (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist));
- free (fnp->u.udf.vlist);
+ xfree (GFC_DESCRIPTOR_DATA(fnp->u.udf.vlist));
+ xfree (fnp->u.udf.vlist);
}
for (fa = fmt->array.next; fa; fa = fa_next)
{
fa_next = fa->next;
- free (fa);
+ xfree (fa);
}
- free (fmt);
+ xfree (fmt);
fmt = NULL;
}
@@ -388,7 +388,7 @@ ttynam (char **name, gfc_charlen_type *name_len, int unit)
unlock_unit (u);
return;
}
- free (*name);
+ xfree (*name);
unlock_unit (u);
}
@@ -136,7 +136,7 @@ free_saved (st_parameter_dt *dtp)
if (dtp->u.p.saved_string == NULL)
return;
- free (dtp->u.p.saved_string);
+ xfree (dtp->u.p.saved_string);
dtp->u.p.saved_string = NULL;
dtp->u.p.saved_used = 0;
@@ -154,7 +154,7 @@ free_line (st_parameter_dt *dtp)
if (dtp->u.p.line_buffer == NULL)
return;
- free (dtp->u.p.line_buffer);
+ xfree (dtp->u.p.line_buffer);
dtp->u.p.line_buffer = NULL;
}
@@ -2727,7 +2727,7 @@ nml_touch_nodes (namelist_info *nl)
else
break;
}
- free (ext_name);
+ xfree (ext_name);
return;
}
@@ -3057,18 +3057,18 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info *nl, index_type offset,
pprev_nl, nml_err_msg, nml_err_msg_size,
clow, chigh))
{
- free (obj_name);
+ xfree (obj_name);
return false;
}
if (dtp->u.p.input_complete)
{
- free (obj_name);
+ xfree (obj_name);
return true;
}
}
- free (obj_name);
+ xfree (obj_name);
goto incr_idx;
default:
@@ -3324,7 +3324,7 @@ get_name:
nl = find_nml_node (dtp, ext_name);
if (ext_size > EXT_STACK_SZ)
- free (ext_name);
+ xfree (ext_name);
}
else
nl = find_nml_node (dtp, dtp->u.p.saved_string);
@@ -52,13 +52,13 @@ free_ionml (st_parameter_dt *dtp)
{
t2 = t1;
t1 = t1->next;
- free (t2->var_name);
+ xfree (t2->var_name);
if (t2->var_rank)
{
- free (t2->dim);
- free (t2->ls);
+ xfree (t2->dim);
+ xfree (t2->ls);
}
- free (t2);
+ xfree (t2);
}
}
dtp->u.p.ionml = NULL;
@@ -573,8 +573,8 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags *flags)
snprintf (msg, msglen, "Cannot open file '%s': %s", path,
gf_strerror (errno, errbuf, sizeof (errbuf)));
generate_error (&opp->common, LIBERROR_OS, msg);
- free (msg);
- free (path);
+ xfree (msg);
+ xfree (path);
goto cleanup;
}
@@ -671,7 +671,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags *flags)
test_endfile (u);
if (flags->status == STATUS_SCRATCH && opp->file != NULL)
- free (opp->file);
+ xfree (opp->file);
if (flags->form == FORM_FORMATTED)
{
@@ -696,7 +696,7 @@ new_unit (st_parameter_open *opp, gfc_unit *u, unit_flags *flags)
/* Free memory associated with a temporary filename. */
if (flags->status == STATUS_SCRATCH && opp->file != NULL)
- free (opp->file);
+ xfree (opp->file);
fail:
@@ -736,7 +736,7 @@ already_open (st_parameter_open *opp, gfc_unit *u, unit_flags *flags)
if (u->filename && u->flags.status == STATUS_SCRATCH)
remove (u->filename);
#endif
- free (u->filename);
+ xfree (u->filename);
u->filename = NULL;
u = new_unit (opp, u, flags);
@@ -1037,7 +1037,7 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length)
convert_infnan (dtp, dest, buffer, length);
if (buf_size > READF_TMP)
- free (buffer);
+ xfree (buffer);
return;
}
@@ -1231,7 +1231,7 @@ done:
/* Do the actual conversion. */
convert_real (dtp, dest, buffer, length);
if (buf_size > READF_TMP)
- free (buffer);
+ xfree (buffer);
return;
/* The value read is zero. */
@@ -1271,7 +1271,7 @@ zero:
bad_float:
if (buf_size > READF_TMP)
- free (buffer);
+ xfree (buffer);
generate_error (&dtp->common, LIBERROR_READ_VALUE,
"Bad value during floating point read");
next_record (dtp, 1);
@@ -1721,7 +1721,7 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind
dtp->u.p.current_unit->child_dtio--;
if (f->u.udf.string_len != 0)
- free (iotype);
+ xfree (iotype);
/* Note: vlist is freed in free_format_data. */
break;
@@ -2193,7 +2193,7 @@ formatted_transfer_scalar_write (st_parameter_dt *dtp, bt type, void *p, int kin
dtp->u.p.current_unit->child_dtio--;
if (f->u.udf.string_len != 0)
- free (iotype);
+ xfree (iotype);
/* Note: vlist is freed in free_format_data. */
break;
@@ -4296,8 +4296,8 @@ finalize_transfer (st_parameter_dt *dtp)
{
if (cf & IOPARM_DT_HAS_FORMAT)
{
- free (dtp->u.p.fmt);
- free (dtp->format);
+ xfree (dtp->u.p.fmt);
+ xfree (dtp->format);
}
return;
}
@@ -4496,10 +4496,10 @@ st_read_done_worker (st_parameter_dt *dtp, bool unlock)
{
if ((dtp->common.flags & IOPARM_DT_HAS_UDTIO) == 0)
{
- free (dtp->u.p.current_unit->filename);
+ xfree (dtp->u.p.current_unit->filename);
dtp->u.p.current_unit->filename = NULL;
if (dtp->u.p.current_unit->ls)
- free (dtp->u.p.current_unit->ls);
+ xfree (dtp->u.p.current_unit->ls);
dtp->u.p.current_unit->ls = NULL;
}
free_newunit = true;
@@ -4593,10 +4593,10 @@ st_write_done_worker (st_parameter_dt *dtp, bool unlock)
{
if ((dtp->common.flags & IOPARM_DT_HAS_UDTIO) == 0)
{
- free (dtp->u.p.current_unit->filename);
+ xfree (dtp->u.p.current_unit->filename);
dtp->u.p.current_unit->filename = NULL;
if (dtp->u.p.current_unit->ls)
- free (dtp->u.p.current_unit->ls);
+ xfree (dtp->u.p.current_unit->ls);
dtp->u.p.current_unit->ls = NULL;
}
free_newunit = true;
@@ -254,7 +254,7 @@ static void
destroy_unit_mutex (gfc_unit *u)
{
__gthread_mutex_destroy (&u->lock);
- free (u);
+ xfree (u);
}
@@ -638,7 +638,7 @@ init_units (void)
u->recl = default_recl;
u->endfile = NO_ENDFILE;
- u->filename = strdup (stdin_name);
+ u->filename = xstrdup (stdin_name);
fbuf_init (u, 0);
@@ -669,7 +669,7 @@ init_units (void)
u->recl = default_recl;
u->endfile = AT_ENDFILE;
- u->filename = strdup (stdout_name);
+ u->filename = xstrdup (stdout_name);
fbuf_init (u, 0);
@@ -699,7 +699,7 @@ init_units (void)
u->recl = default_recl;
u->endfile = AT_ENDFILE;
- u->filename = strdup (stderr_name);
+ u->filename = xstrdup (stderr_name);
fbuf_init (u, 256); /* 256 bytes should be enough, probably not doing
any kind of exotic formatting to stderr. */
@@ -739,7 +739,7 @@ close_unit_1 (gfc_unit *u, int locked)
delete_unit (u);
- free (u->filename);
+ xfree (u->filename);
u->filename = NULL;
free_format_hash_table (u);
@@ -800,7 +800,7 @@ close_units (void)
close_unit_1 (unit_root, 1);
UNLOCK (&unit_lock);
- free (newunits);
+ xfree (newunits);
#ifdef HAVE_POSIX_2008_LOCALE
freelocale (c_locale);
@@ -867,7 +867,7 @@ filename_from_unit (int n)
/* Get the filename. */
if (u != NULL && u->filename != NULL)
- return strdup (u->filename);
+ return xstrdup (u->filename);
else
return (char *) NULL;
}
@@ -485,7 +485,7 @@ raw_close (unix_stream *s)
}
else
retval = 0;
- free (s);
+ xfree (s);
return retval;
}
@@ -750,7 +750,7 @@ buf_close (unix_stream *s)
{
if (buf_flush (s) != 0)
return -1;
- free (s->buffer);
+ xfree (s->buffer);
return raw_close (s);
}
@@ -1029,7 +1029,7 @@ static int
mem_close (unix_stream *s)
{
if (s)
- free (s);
+ xfree (s);
return 0;
}
@@ -1316,7 +1316,7 @@ tempfile (st_parameter_open *opp)
buffer[0] = 0;
else
buffer[ret] = 0;
- tempdir = strdup (buffer);
+ tempdir = xstrdup (buffer);
fd = tempfile_open (tempdir, &fname);
}
#elif defined(__CYGWIN__)
@@ -1550,7 +1550,7 @@ regular_file (st_parameter_open *opp, unit_flags *flags)
{
char *path = fc_strdup (opp->file, opp->file_len);
int fd = regular_file2 (path, opp, flags);
- free (path);
+ xfree (path);
return fd;
}
@@ -1692,7 +1692,7 @@ compare_file_filename (gfc_unit *u, const char *name, gfc_charlen_type len)
ret = 0;
#endif
done:
- free (path);
+ xfree (path);
return ret;
}
@@ -1798,14 +1798,14 @@ retry:
LOCK (&unit_lock);
UNLOCK (&u->lock);
if (predec_waiting_locked (u) == 0)
- free (u);
+ xfree (u);
goto retry;
}
dec_waiting_unlocked (u);
}
done:
- free (path);
+ xfree (path);
return u;
}
@@ -1865,7 +1865,7 @@ flush_all_units (void)
LOCK (&unit_lock);
UNLOCK (&u->lock);
if (predec_waiting_locked (u) == 0)
- free (u);
+ xfree (u);
}
}
while (1);
@@ -1914,7 +1914,7 @@ file_exists (const char *file, gfc_charlen_type file_len)
{
char *path = fc_strdup (file, file_len);
int res = !(access (path, F_OK));
- free (path);
+ xfree (path);
return res;
}
@@ -1928,7 +1928,7 @@ file_size (const char *file, gfc_charlen_type file_len)
struct stat statbuf;
int err;
TEMP_FAILURE_RETRY (err = stat (path, &statbuf));
- free (path);
+ xfree (path);
if (err == -1)
return -1;
return (GFC_IO_INT) statbuf.st_size;
@@ -1951,7 +1951,7 @@ inquire_sequential (const char *string, gfc_charlen_type len)
char *path = fc_strdup (string, len);
int err;
TEMP_FAILURE_RETRY (err = stat (path, &statbuf));
- free (path);
+ xfree (path);
if (err == -1)
return unknown;
@@ -1980,7 +1980,7 @@ inquire_direct (const char *string, gfc_charlen_type len)
char *path = fc_strdup (string, len);
int err;
TEMP_FAILURE_RETRY (err = stat (path, &statbuf));
- free (path);
+ xfree (path);
if (err == -1)
return unknown;
@@ -2009,7 +2009,7 @@ inquire_formatted (const char *string, gfc_charlen_type len)
char *path = fc_strdup (string, len);
int err;
TEMP_FAILURE_RETRY (err = stat (path, &statbuf));
- free (path);
+ xfree (path);
if (err == -1)
return unknown;
@@ -2045,7 +2045,7 @@ inquire_access (const char *string, gfc_charlen_type len, int mode)
return no;
char *path = fc_strdup (string, len);
int res = access (path, mode);
- free (path);
+ xfree (path);
if (res == -1)
return no;
@@ -1636,9 +1636,9 @@ write_float_0 (st_parameter_dt *dtp, const fnode *f, const char *source, int kin
write_float_string (dtp, result, flt_str_len);
if (buf_size > BUF_STACK_SZ)
- free (buffer);
+ xfree (buffer);
if (res_len > BUF_STACK_SZ)
- free (result);
+ xfree (result);
}
void
@@ -1763,9 +1763,9 @@ write_real (st_parameter_dt *dtp, const char *source, int kind)
dtp->u.p.scale_factor = orig_scale;
if (buf_size > BUF_STACK_SZ)
- free (buffer);
+ xfree (buffer);
if (res_len > BUF_STACK_SZ)
- free (result);
+ xfree (result);
}
/* Similar to list formatted REAL output, for kPG0 where k > 0 we
@@ -1818,9 +1818,9 @@ write_real_w0 (st_parameter_dt *dtp, const char *source, int kind,
dtp->u.p.g0_no_blanks = 0;
if (buf_size > BUF_STACK_SZ)
- free (buffer);
+ xfree (buffer);
if (res_len > BUF_STACK_SZ)
- free (result);
+ xfree (result);
}
@@ -1879,11 +1879,11 @@ write_complex (st_parameter_dt *dtp, const char *source, int kind, size_t size)
dtp->u.p.scale_factor = orig_scale;
dtp->u.p.g0_no_blanks = 0;
if (buf_size > BUF_STACK_SZ)
- free (buffer);
+ xfree (buffer);
if (res_len1 > BUF_STACK_SZ)
- free (result1);
+ xfree (result1);
if (res_len2 > BUF_STACK_SZ)
- free (result2);
+ xfree (result2);
}
@@ -2384,8 +2384,8 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info *obj, index_type offset,
obj, ext_name);
}
- free (obj_name);
- free (ext_name);
+ xfree (obj_name);
+ xfree (ext_name);
goto obj_loop;
default:
@@ -871,6 +871,9 @@ internal_proto(xcalloc);
extern void *xrealloc (void *, size_t);
internal_proto(xrealloc);
+extern void xfree (void *);
+internal_proto(xfree);
+
/* environ.c */
extern void init_variables (void);
@@ -919,6 +922,9 @@ internal_proto(fc_strdup);
extern char *fc_strdup_notrim(const char *, gfc_charlen_type);
internal_proto(fc_strdup_notrim);
+extern char *xstrdup(const char *);
+internal_proto(xstrdup);
+
extern const char *gfc_itoa(GFC_UINTEGER_LARGEST, char *, size_t);
internal_proto(gfc_itoa);
@@ -255,7 +255,7 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
if (t1_dim > 65536)
t1_dim = 65536;
- t1 = malloc (t1_dim * sizeof('rtype_name`));
+ t1 = xmalloc (t1_dim * sizeof('rtype_name`));
/* Start turning the crank. */
i1 = n;
@@ -466,7 +466,7 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
}
}
}
- free(t1);
+ xfree (t1);
return;
}
else if (rxstride == 1 && aystride == 1 && bxstride == 1)
@@ -137,7 +137,7 @@ gfc_desc_to_cfi_desc (CFI_cdesc_t **d_ptr, const gfc_array_void *s)
by setting the length to CFI_MAX_RANK. This should not be necessary
but valgrind complains accesses after the allocated block. */
if (*d_ptr == NULL)
- d = calloc (1, (sizeof (CFI_cdesc_t)
+ d = xcalloc (1, (sizeof (CFI_cdesc_t)
+ (CFI_type_t)(CFI_MAX_RANK * sizeof (CFI_dim_t))));
else
d = *d_ptr;
@@ -378,7 +378,7 @@ CFI_allocate (CFI_cdesc_t *dv, const CFI_index_t lower_bounds[],
}
}
- dv->base_addr = calloc (arr_len, dv->elem_len);
+ dv->base_addr = xcalloc (arr_len, dv->elem_len);
if (dv->base_addr == NULL)
{
fprintf (stderr, "CFI_allocate: Failure in memory allocation.\n");
@@ -418,7 +418,7 @@ CFI_deallocate (CFI_cdesc_t *dv)
}
/* Free and nullify memory. */
- free (dv->base_addr);
+ xfree (dv->base_addr);
dv->base_addr = NULL;
return CFI_SUCCESS;
@@ -285,7 +285,7 @@ show_locus (st_parameter_common *cmp)
{
st_printf ("At line %d of file %s (unit = %d, file = '%s')\n",
(int) cmp->line, cmp->filename, (int) cmp->unit, filename);
- free (filename);
+ xfree (filename);
}
else
{
@@ -334,7 +334,7 @@ static void __attribute__((constructor))
constructor_recursion_check (void)
{
if (__gthread_active_p ())
- __gthread_key_create (&recursion_key, &free);
+ __gthread_key_create (&recursion_key, &xfree);
}
static void __attribute__((destructor))
@@ -43,7 +43,6 @@ xmalloc (size_t n)
return p;
}
-
void *
xmallocarray (size_t nmemb, size_t size)
{
@@ -66,7 +65,6 @@ xmallocarray (size_t nmemb, size_t size)
return p;
}
-
/* calloc wrapper that aborts on error. */
void *
@@ -82,7 +80,6 @@ xcalloc (size_t nmemb, size_t size)
return p;
}
-
void *
xrealloc (void *ptr, size_t size)
{
@@ -95,3 +92,9 @@ xrealloc (void *ptr, size_t size)
return newp;
}
+
+void
+xfree (void *ptr)
+{
+ free (ptr);
+}
@@ -169,7 +169,7 @@ show_locus (st_parameter_common *cmp)
{
st_printf ("At line %d of file %s (unit = %d, file = '%s')\n",
(int) cmp->line, cmp->filename, (int) cmp->unit, filename);
- free (filename);
+ xfree (filename);
}
else
{
@@ -106,20 +106,29 @@ strnlen (const char *s, size_t maxlen)
#endif
-#ifndef HAVE_STRNDUP
static char *
-strndup (const char *s, size_t n)
+fc_strndup (const char *s, size_t n)
{
size_t len = strnlen (s, n);
- char *p = malloc (len + 1);
+ char *p = xmalloc (len + 1);
if (!p)
return NULL;
memcpy (p, s, len);
p[len] = '\0';
return p;
}
-#endif
+char *
+xstrdup (const char *src)
+{
+ size_t len = strlen (src) + 1;
+ void *new = xmalloc (len);
+
+ if (new == NULL)
+ return NULL;
+
+ return (char *) memcpy (new, src, len);
+}
/* Duplicate a non-null-terminated Fortran string to a malloced
null-terminated C string. */
@@ -128,7 +137,7 @@ char *
fc_strdup (const char *src, gfc_charlen_type src_len)
{
gfc_charlen_type n = fstrlen (src, src_len);
- char *p = strndup (src, n);
+ char *p = fc_strndup (src, n);
if (!p)
os_error ("Memory allocation failed in fc_strdup");
return p;
@@ -142,7 +151,7 @@ fc_strdup (const char *src, gfc_charlen_type src_len)
char *
fc_strdup_notrim (const char *src, gfc_charlen_type src_len)
{
- char *p = strndup (src, src_len);
+ char *p = fc_strndup (src, src_len);
if (!p)
os_error ("Memory allocation failed in fc_strdup");
return p;