https://gcc.gnu.org/g:77a337b33a89d8f7f4cd92c9bee1ce7d2258e3ba
commit 77a337b33a89d8f7f4cd92c9bee1ce7d2258e3ba Author: Mikael Morin <mik...@gcc.gnu.org> Date: Wed Apr 30 18:52:14 2025 +0200 Correction régression pointer_function_result_1 Diff: --- gcc/fortran/trans-array.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index bc30c83f4ac1..b8b2fcc8fffe 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -2832,7 +2832,8 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript, { tree type = gfc_typenode_for_spec (&ss_info->expr->ts); if (TYPE_SIZE_UNIT (type) == NULL_TREE - || !INTEGER_CST_P (TYPE_SIZE_UNIT (type))) + || !INTEGER_CST_P (TYPE_SIZE_UNIT (type)) + || gfc_expr_attr (ss_info->expr).pointer) { for (n = 0; n < ss_info->expr->rank; n++) { @@ -3726,7 +3727,8 @@ void gfc_conv_tmp_array_ref (gfc_se * se) { se->string_length = se->ss->info->string_length; - gfc_conv_scalarized_array_ref (se, NULL, true); + bool tmp_array = !gfc_expr_attr (se->ss->info->expr).pointer; + gfc_conv_scalarized_array_ref (se, NULL, tmp_array); gfc_advance_se_ss_chain (se); }