public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] Fix Fortran array-access regressions
@ 2022-06-29 14:48 Kwok Yeung
0 siblings, 0 replies; only message in thread
From: Kwok Yeung @ 2022-06-29 14:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9fb0076b11eb2774b620bcf2171d55c7d1fb899f
commit 9fb0076b11eb2774b620bcf2171d55c7d1fb899f
Author: Kwok Cheung Yeung <kcy@codesourcery.com>
Date: Wed May 25 12:10:03 2022 +0100
Fix Fortran array-access regressions
The arguments to gfc_build_array_ref were recently updated in the commit
'fortran: Use pointer arithmetic to index arrays [PR102043]', but a call
from gfc_conv_array_ref used the old function signature. This went
unnoticed due to the use of default arguments.
This patch should be merged into 'Fortran: delinearize multi-dimensional
array accesses'.
2022-05-22 Kwok Cheung Yeung <kcy@codesourcery.com>
gcc/fortran/
* trans-array.cc (gfc_conv_array_ref): Update arguments to
gfc_build_array_ref.
Diff:
---
gcc/fortran/ChangeLog.omp | 5 +++++
gcc/fortran/trans-array.cc | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp
index ec748026a73..59f47d73b73 100644
--- a/gcc/fortran/ChangeLog.omp
+++ b/gcc/fortran/ChangeLog.omp
@@ -1,3 +1,8 @@
+2022-05-22 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * trans-array.cc (gfc_conv_array_ref): Update arguments to
+ gfc_build_array_ref.
+
2022-05-05 Sandra Loosemore <sandra@codesourcery.com>
Backport from mainline:
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index ac2bac707c1..9c4931db916 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -4205,11 +4205,11 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_expr *expr,
gfc_array_index_type, offset, cst_offset);
se->class_vptr = vptr;
vptr = get_class_array_vptr (se->expr, vptr);
- se->expr = gfc_build_array_ref (base, offset, cooked_decl, vptr);
+ se->expr = gfc_build_array_ref (base, offset, cooked_decl, false, vptr);
}
- else
- /* Return the outermost ARRAY_REF we already built. */
- se->expr = aref;
+ else
+ /* Return the outermost ARRAY_REF we already built. */
+ se->expr = aref;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-29 14:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 14:48 [gcc/devel/omp/gcc-12] Fix Fortran array-access regressions Kwok Yeung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).