aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r--gcc/fortran/trans.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index e71430b..c6688d3 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -820,7 +820,7 @@ gfc_allocate_allocatable (stmtblock_t * block, tree mem, tree size, tree token,
the FE only passes the pointer around and leaves the actual
representation to the library. Hence, we have to convert back to the
number of elements. */
- if (lock_var)
+ if (lock_var || event_var)
size = fold_build2_loc (input_location, TRUNC_DIV_EXPR, size_type_node,
size, TYPE_SIZE_UNIT (ptr_type_node));