diff options
Diffstat (limited to 'libgfortran/generated')
-rw-r--r-- | libgfortran/generated/matmul_c10.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c16.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c4.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_c8.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i1.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i16.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i2.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i4.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_i8.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r10.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r16.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r4.c | 70 | ||||
-rw-r--r-- | libgfortran/generated/matmul_r8.c | 70 |
13 files changed, 780 insertions, 130 deletions
diff --git a/libgfortran/generated/matmul_c10.c b/libgfortran/generated/matmul_c10.c index c8e7a6c..55f8fe9 100644 --- a/libgfortran/generated/matmul_c10.c +++ b/libgfortran/generated/matmul_c10.c @@ -286,8 +286,7 @@ matmul_c10_avx (gfc_array_c10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_c10_avx (gfc_array_c10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_c10_avx2 (gfc_array_c10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_c10_avx2 (gfc_array_c10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_c10_avx512f (gfc_array_c10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_c10_avx512f (gfc_array_c10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_c10_vanilla (gfc_array_c10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_c10_vanilla (gfc_array_c10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_c10 (gfc_array_c10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_c10 (gfc_array_c10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_c16.c b/libgfortran/generated/matmul_c16.c index adbf1c8..bc90296 100644 --- a/libgfortran/generated/matmul_c16.c +++ b/libgfortran/generated/matmul_c16.c @@ -286,8 +286,7 @@ matmul_c16_avx (gfc_array_c16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_c16_avx (gfc_array_c16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_c16_avx2 (gfc_array_c16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_c16_avx2 (gfc_array_c16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_c16_avx512f (gfc_array_c16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_c16_avx512f (gfc_array_c16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_c16_vanilla (gfc_array_c16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_c16_vanilla (gfc_array_c16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_c16 (gfc_array_c16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_c16 (gfc_array_c16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c index ff0e76a..1241800 100644 --- a/libgfortran/generated/matmul_c4.c +++ b/libgfortran/generated/matmul_c4.c @@ -286,8 +286,7 @@ matmul_c4_avx (gfc_array_c4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_c4_avx (gfc_array_c4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_c4_avx2 (gfc_array_c4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_c4_avx2 (gfc_array_c4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_c4_avx512f (gfc_array_c4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_c4_avx512f (gfc_array_c4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_c4_vanilla (gfc_array_c4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_c4_vanilla (gfc_array_c4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_c4 (gfc_array_c4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_c4 (gfc_array_c4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c index 483ebf1..aafa3be 100644 --- a/libgfortran/generated/matmul_c8.c +++ b/libgfortran/generated/matmul_c8.c @@ -286,8 +286,7 @@ matmul_c8_avx (gfc_array_c8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_c8_avx (gfc_array_c8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_c8_avx2 (gfc_array_c8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_c8_avx2 (gfc_array_c8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_c8_avx512f (gfc_array_c8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_c8_avx512f (gfc_array_c8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_c8_vanilla (gfc_array_c8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_c8_vanilla (gfc_array_c8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_c8 (gfc_array_c8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_COMPLEX_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_COMPLEX_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_c8 (gfc_array_c8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_COMPLEX_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_i1.c b/libgfortran/generated/matmul_i1.c index 51cfcc0..bbf84a9 100644 --- a/libgfortran/generated/matmul_i1.c +++ b/libgfortran/generated/matmul_i1.c @@ -286,8 +286,7 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_1 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_1 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_i1_avx2 (gfc_array_i1 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_1 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_1 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_i1_avx2 (gfc_array_i1 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_i1_avx512f (gfc_array_i1 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_1 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_1 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_i1_avx512f (gfc_array_i1 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_i1_vanilla (gfc_array_i1 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_1 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_1 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_i1_vanilla (gfc_array_i1 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_i1 (gfc_array_i1 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_1 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_1 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_i1 (gfc_array_i1 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_i16.c b/libgfortran/generated/matmul_i16.c index 90a422f..1394aba 100644 --- a/libgfortran/generated/matmul_i16.c +++ b/libgfortran/generated/matmul_i16.c @@ -286,8 +286,7 @@ matmul_i16_avx (gfc_array_i16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_i16_avx (gfc_array_i16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_i16_avx2 (gfc_array_i16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_i16_avx2 (gfc_array_i16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_i16_avx512f (gfc_array_i16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_i16_avx512f (gfc_array_i16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_i16_vanilla (gfc_array_i16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_i16_vanilla (gfc_array_i16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_i16 (gfc_array_i16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_i16 (gfc_array_i16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_i2.c b/libgfortran/generated/matmul_i2.c index 58be84f..9ffe75b 100644 --- a/libgfortran/generated/matmul_i2.c +++ b/libgfortran/generated/matmul_i2.c @@ -286,8 +286,7 @@ matmul_i2_avx (gfc_array_i2 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_2 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_2 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_i2_avx (gfc_array_i2 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_2 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_i2_avx2 (gfc_array_i2 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_2 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_2 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_i2_avx2 (gfc_array_i2 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_2 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_i2_avx512f (gfc_array_i2 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_2 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_2 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_i2_avx512f (gfc_array_i2 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_2 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_i2_vanilla (gfc_array_i2 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_2 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_2 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_i2_vanilla (gfc_array_i2 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_2 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_i2 (gfc_array_i2 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_2 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_2 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_i2 (gfc_array_i2 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_2 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c index 1e724d54..eab6c77 100644 --- a/libgfortran/generated/matmul_i4.c +++ b/libgfortran/generated/matmul_i4.c @@ -286,8 +286,7 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_i4 (gfc_array_i4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_i4 (gfc_array_i4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c index f5ed84f..4dee0ab 100644 --- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.c @@ -286,8 +286,7 @@ matmul_i8_avx (gfc_array_i8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_i8_avx (gfc_array_i8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_i8_avx2 (gfc_array_i8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_i8_avx2 (gfc_array_i8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_i8_avx512f (gfc_array_i8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_i8_avx512f (gfc_array_i8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_i8_vanilla (gfc_array_i8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_i8_vanilla (gfc_array_i8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_i8 (gfc_array_i8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_INTEGER_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_INTEGER_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_i8 (gfc_array_i8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_INTEGER_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_r10.c b/libgfortran/generated/matmul_r10.c index 8f76fac..4b66a84 100644 --- a/libgfortran/generated/matmul_r10.c +++ b/libgfortran/generated/matmul_r10.c @@ -286,8 +286,7 @@ matmul_r10_avx (gfc_array_r10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_r10_avx (gfc_array_r10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_r10_avx2 (gfc_array_r10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_r10_avx2 (gfc_array_r10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_r10_avx512f (gfc_array_r10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_r10_avx512f (gfc_array_r10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_r10_vanilla (gfc_array_r10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_r10_vanilla (gfc_array_r10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_r10 (gfc_array_r10 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_10 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_10 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_r10 (gfc_array_r10 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_10 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_r16.c b/libgfortran/generated/matmul_r16.c index 6a7687f..fcef45b 100644 --- a/libgfortran/generated/matmul_r16.c +++ b/libgfortran/generated/matmul_r16.c @@ -286,8 +286,7 @@ matmul_r16_avx (gfc_array_r16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_r16_avx (gfc_array_r16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_r16_avx2 (gfc_array_r16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_r16_avx2 (gfc_array_r16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_r16_avx512f (gfc_array_r16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_r16_avx512f (gfc_array_r16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_r16_vanilla (gfc_array_r16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_r16_vanilla (gfc_array_r16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_r16 (gfc_array_r16 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_16 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_16 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_r16 (gfc_array_r16 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_16 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c index dbb31b0..0996c69 100644 --- a/libgfortran/generated/matmul_r4.c +++ b/libgfortran/generated/matmul_r4.c @@ -286,8 +286,7 @@ matmul_r4_avx (gfc_array_r4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_r4_avx (gfc_array_r4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_r4_avx2 (gfc_array_r4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_r4_avx2 (gfc_array_r4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_r4_avx512f (gfc_array_r4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_r4_avx512f (gfc_array_r4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_r4_vanilla (gfc_array_r4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_r4_vanilla (gfc_array_r4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_r4 (gfc_array_r4 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_4 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_4 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_r4 (gfc_array_r4 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_4 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c index 23efed2..1d75e5c 100644 --- a/libgfortran/generated/matmul_r8.c +++ b/libgfortran/generated/matmul_r8.c @@ -286,8 +286,7 @@ matmul_r8_avx (gfc_array_r8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -311,6 +310,17 @@ matmul_r8_avx (gfc_array_r8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -829,8 +839,7 @@ matmul_r8_avx2 (gfc_array_r8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -854,6 +863,17 @@ matmul_r8_avx2 (gfc_array_r8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1372,8 +1392,7 @@ matmul_r8_avx512f (gfc_array_r8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1397,6 +1416,17 @@ matmul_r8_avx512f (gfc_array_r8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -1911,8 +1941,7 @@ matmul_r8_vanilla (gfc_array_r8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -1936,6 +1965,17 @@ matmul_r8_vanilla (gfc_array_r8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) @@ -2508,8 +2548,7 @@ matmul_r8 (gfc_array_r8 * const restrict retarray, i1, i2, i3, i4, i5, i6; /* Local variables */ - GFC_REAL_8 t1[65536], /* was [256][256] */ - f11, f12, f21, f22, f31, f32, f41, f42, + GFC_REAL_8 f11, f12, f21, f22, f31, f32, f41, f42, f13, f14, f23, f24, f33, f34, f43, f44; index_type i, j, l, ii, jj, ll; index_type isec, jsec, lsec, uisec, ujsec, ulsec; @@ -2533,6 +2572,17 @@ matmul_r8 (gfc_array_r8 * const restrict retarray, if (m == 0 || n == 0 || k == 0) return; + /* Adjust size of t1 to what is needed. */ + index_type t1_dim; + t1_dim = (a_dim1-1) * 256 + b_dim1; + if (t1_dim > 65536) + t1_dim = 65536; + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" + GFC_REAL_8 t1[t1_dim]; /* was [256][256] */ +#pragma GCC diagnostic pop + /* Empty c first. */ for (j=1; j<=n; j++) for (i=1; i<=m; i++) |