Commit bdce44cd authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add constructs to prevent new warnings from gcc 11.

parent 27a024c6
......@@ -178,11 +178,20 @@ xt_exchanger_neigh_alltoall_new(int nsend, int nrecv,
exchanger->datatypes + nsend, comm, dt_dup);
enum { no_reorder = 0 }; // no reordering of ranks in new comm
#if __GNUC__ == 11
/* GCC 11 has no means to specify that the special value pointer
* MPI_UNWEIGHTED does not need to point to something of size > 0 */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif
xt_mpi_call(
MPI_Dist_graph_create_adjacent(
comm, nrecv, exchanger->ranks + nsend, MPI_UNWEIGHTED, nsend,
exchanger->ranks, MPI_UNWEIGHTED, MPI_INFO_NULL, no_reorder,
&(exchanger->comm)), comm);
#if __GNUC__ == 11
#pragma GCC diagnostic pop
#endif
return (Xt_exchanger)exchanger;
}
......
......@@ -163,6 +163,11 @@ struct Xt_idxsection_ {
static int
idxsection_get_num_indices(Xt_idxsection section);
#if __GNUC__ >= 11
__attribute__ ((access (none, 1)))
int MPI_Get_address(XT_MPI_SEND_BUF_CONST void *location, MPI_Aint *address);
#endif
void
xt_idxsection_initialize(void)
{
......
......@@ -151,6 +151,11 @@ static const struct xt_idxlist_vtable idxstripes_vtable = {
static MPI_Datatype stripe_dt;
#if __GNUC__ >= 11
__attribute__ ((access (none, 1)))
int MPI_Get_address(XT_MPI_SEND_BUF_CONST void *location, MPI_Aint *address);
#endif
void
xt_idxstripes_initialize(void)
{
......
......@@ -228,6 +228,13 @@ xt_xmap_dist_dir_match_src_dst(const struct dist_dir *src_dist_dir,
return isect_fill;
}
#if __GNUC__ == 11 && __GNUC_MINOR__ == 1
/* gcc 11.1 has a bug in the -fsanitize=undefined functionality
* which creates a bogus warning without the below suppression, bug
* report at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101585 */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wvla-parameter"
#endif
size_t
xt_xmap_dist_dir_pack_intersections(
......@@ -274,6 +281,10 @@ xt_xmap_dist_dir_pack_intersections(
return num_send_indices_requests;
}
#if __GNUC__ == 11
#pragma GCC diagnostic pop
#endif
static int
stripe_cmp(const void *a, const void *b)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment