summaryrefslogtreecommitdiff
path: root/libgomp/work.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/work.c')
-rw-r--r--libgomp/work.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgomp/work.c b/libgomp/work.c
index a88409dc78b..c53625afe2c 100644
--- a/libgomp/work.c
+++ b/libgomp/work.c
@@ -113,7 +113,9 @@ gomp_init_work_share (struct gomp_work_share *ws, size_t ordered,
size_t o = nthreads * sizeof (*ws->ordered_team_ids);
o += __alignof__ (long long) - 1;
if ((offsetof (struct gomp_work_share, inline_ordered_team_ids)
- & (__alignof__ (long long) - 1)) == 0)
+ & (__alignof__ (long long) - 1)) == 0
+ && __alignof__ (struct gomp_work_share)
+ >= __alignof__ (long long))
o &= ~(__alignof__ (long long) - 1);
ordered += o - 1;
}