diff options
author | Nicolas Koenig <koenigni@student.ethz.ch> | 2020-11-15 12:40:05 +0100 |
---|---|---|
committer | Nicolas Koenig <koenigni@student.ethz.ch> | 2020-11-15 12:41:22 +0100 |
commit | 649754c5b4a888c2c69c1a9cbeb1c356899934c1 (patch) | |
tree | 7c2b6fa53d32a8a44d9b7607f012b8197f01a5cb /gcc | |
parent | dd06247d91866b75c2f5512320737a31da7a6e16 (diff) | |
download | gcc-649754c5b4a888c2c69c1a9cbeb1c356899934c1.zip gcc-649754c5b4a888c2c69c1a9cbeb1c356899934c1.tar.gz gcc-649754c5b4a888c2c69c1a9cbeb1c356899934c1.tar.bz2 |
Do not do overflow checks on allocating shared coarrays; reformatting.
gcc/fortran/ChangeLog:
PR fortran/97589
* trans-array.c (gfc_array_allocate): Do not do overflow checks
for shared coarrays.
libgfortran/ChangeLog:
* nca/alloc.c: Reformat.
* nca/allocator.c: Reformat.
* nca/coarraynative.c: Reformat.
* nca/collective_subroutine.c Reformat.
* nca/counter_barrier.c: Reformat.
* nca/hashmap.c: Reformat.
* nca/shared_memory.c: Reformat.
* nca/sync.c: Reformat.
* nca/util.c: Reformat.
* nca/wrapper.c: Reformat.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/trans-array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 28de4ba..fd66f0b 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -6099,7 +6099,7 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg, expr3_elem_size, nelems, expr3, e3_arr_desc, e3_has_nodescriptor, expr, &element_size); - if (dimension || (flag_coarray == GFC_FCOARRAY_SHARED && coarray)) + if (dimension && !(flag_coarray == GFC_FCOARRAY_SHARED && coarray)) { var_overflow = gfc_create_var (integer_type_node, "overflow"); gfc_add_modify (&se->pre, var_overflow, overflow); @@ -6176,7 +6176,7 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree status, tree errmsg, else gfc_allocate_using_malloc (&elseblock, pointer, size, status); - if (dimension) + if (dimension && !(flag_coarray == GFC_FCOARRAY_SHARED && coarray)) { cond = gfc_unlikely (fold_build2_loc (input_location, NE_EXPR, logical_type_node, var_overflow, integer_zero_node), |