diff options
author | Alejandro Colomar <alx@kernel.org> | 2024-10-16 14:10:39 +0200 |
---|---|---|
committer | Joseph Myers <josmyers@redhat.com> | 2024-10-18 22:39:20 +0000 |
commit | 11577659949dfd1dfb49cc14e6dcc6b394ebd8c4 (patch) | |
tree | 3041b6164fe7685189be705dcb948783a4532c71 /gcc/fortran | |
parent | f8687bceaa8ef9cd3c48b6706e8620af3ec5e2eb (diff) | |
download | gcc-11577659949dfd1dfb49cc14e6dcc6b394ebd8c4.zip gcc-11577659949dfd1dfb49cc14e6dcc6b394ebd8c4.tar.gz gcc-11577659949dfd1dfb49cc14e6dcc6b394ebd8c4.tar.bz2 |
gcc/: Rename array_type_nelts => array_type_nelts_minus_one
The old name was misleading.
While at it, also rename some temporary variables that are used with
this function, for consistency.
Link: <https://inbox.sourceware.org/gcc-patches/9fffd80-dca-2c7e-14b-6c9b509a7215@redhat.com/T/#m2f661c67c8f7b2c405c8c7fc3152dd85dc729120>
gcc/ChangeLog:
* tree.cc (array_type_nelts, array_type_nelts_minus_one)
* tree.h (array_type_nelts, array_type_nelts_minus_one)
* expr.cc (count_type_elements)
* config/aarch64/aarch64.cc
(pure_scalable_type_info::analyze_array)
* config/i386/i386.cc (ix86_canonical_va_list_type):
Rename array_type_nelts => array_type_nelts_minus_one
The old name was misleading.
gcc/c/ChangeLog:
* c-decl.cc (one_element_array_type_p, get_parm_array_spec)
* c-fold.cc (c_fold_array_ref):
Rename array_type_nelts => array_type_nelts_minus_one
gcc/cp/ChangeLog:
* decl.cc (reshape_init_array)
* init.cc
(build_zero_init_1)
(build_value_init_noctor)
(build_vec_init)
(build_delete)
* lambda.cc (add_capture)
* tree.cc (array_type_nelts_top):
Rename array_type_nelts => array_type_nelts_minus_one
gcc/fortran/ChangeLog:
* trans-array.cc (structure_alloc_comps)
* trans-openmp.cc
(gfc_walk_alloc_comps)
(gfc_omp_clause_linear_ctor):
Rename array_type_nelts => array_type_nelts_minus_one
gcc/rust/ChangeLog:
* backend/rust-tree.cc (array_type_nelts_top):
Rename array_type_nelts => array_type_nelts_minus_one
Suggested-by: Richard Biener <richard.guenther@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/trans-array.cc | 2 | ||||
-rw-r--r-- | gcc/fortran/trans-openmp.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index 0b8ef0b..160a543 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -9695,7 +9695,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, tree dest, else { /* Otherwise use the TYPE_DOMAIN information. */ - tmp = array_type_nelts (decl_type); + tmp = array_type_nelts_minus_one (decl_type); tmp = fold_convert (gfc_array_index_type, tmp); } diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index d3783f5..f4c9314 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -582,7 +582,7 @@ gfc_walk_alloc_comps (tree decl, tree dest, tree var, tem = size_binop (MINUS_EXPR, tem, size_one_node); } else - tem = array_type_nelts (type); + tem = array_type_nelts_minus_one (type); tem = fold_convert (gfc_array_index_type, tem); } @@ -1309,7 +1309,7 @@ gfc_omp_clause_linear_ctor (tree clause, tree dest, tree src, tree add) nelems = size_binop (MINUS_EXPR, nelems, size_one_node); } else - nelems = array_type_nelts (type); + nelems = array_type_nelts_minus_one (type); nelems = fold_convert (gfc_array_index_type, nelems); gfc_omp_linear_clause_add_loop (&block, dest, src, add, nelems); |