[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction régression pointer_function_result_1
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 15:00:40 GMT 2025
https://gcc.gnu.org/g:81122ba4e5d6e482a363f3afbd04e795d346f103
commit 81122ba4e5d6e482a363f3afbd04e795d346f103
Author: Mikael Morin <mikael@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 4b5edd66b4d4..8ce1afbf9bf6 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -2827,7 +2827,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++)
{
@@ -3607,7 +3608,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);
}
More information about the Gcc-cvs
mailing list