summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2020-01-15 08:12:33 +1100
committermattip <matti.picus@gmail.com>2020-01-17 18:27:38 +1100
commit18ab0d378bd1fef28703c56a5f3d48c9859b1d2a (patch)
tree490b181b1653883543494d230b850d3bffe34c8b
parent879d0e43a0509641084a4286bf3159f1d54180d8 (diff)
downloadnumpy-18ab0d378bd1fef28703c56a5f3d48c9859b1d2a.tar.gz
MAINT: try to avoid spurious warnings in einsum
-rw-r--r--.travis.yml2
-rw-r--r--numpy/core/src/multiarray/einsum.c.src8
-rwxr-xr-xtools/travis-before-install.sh1
3 files changed, 11 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
index 8f986863c..ef98d4a27 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -87,6 +87,8 @@ jobs:
packages:
- gfortran
- eatmydata
+ - libgfortran5
+ - libgfortran3
- python: 3.7
env: USE_WHEEL=1 NPY_RELAXED_STRIDES_DEBUG=1
diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src
index 70af3fef9..1cc557825 100644
--- a/numpy/core/src/multiarray/einsum.c.src
+++ b/numpy/core/src/multiarray/einsum.c.src
@@ -2152,6 +2152,11 @@ get_combined_dims_view(PyArrayObject *op, int iop, char *labels)
}
/* A repeated label, find the original one and merge them. */
else {
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
int i = icombinemap[idim + label];
icombinemap[idim] = -1;
@@ -2164,6 +2169,9 @@ get_combined_dims_view(PyArrayObject *op, int iop, char *labels)
return NULL;
}
new_strides[i] += stride;
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
}
}
diff --git a/tools/travis-before-install.sh b/tools/travis-before-install.sh
index 8be8afb10..f53d18611 100755
--- a/tools/travis-before-install.sh
+++ b/tools/travis-before-install.sh
@@ -33,6 +33,7 @@ fi
source venv/bin/activate
python -V
+gcc --version
popd