summaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 9a1624851c3..dd4a0926c44 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -6320,7 +6320,11 @@ lower_omp_ordered_clauses (gimple_stmt_iterator *gsi_p, gomp_ordered *ord_stmt,
return;
wide_int *folded_deps = XALLOCAVEC (wide_int, 2 * len - 1);
- memset (folded_deps, 0, sizeof (*folded_deps) * (2 * len - 1));
+
+ /* wide_int is not a POD so it must be default-constructed. */
+ for (unsigned i = 0; i != 2 * len - 1; ++i)
+ new (static_cast<void*>(folded_deps + i)) wide_int ();
+
tree folded_dep = NULL_TREE;
/* TRUE if the first dimension's offset is negative. */
bool neg_offset_p = false;