https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77871

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #8 from anlauf at gcc dot gnu.org ---
The following patch makes this particular testcase compile:

diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index b7c568e90e6..dbcce4d6ec9 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -2023,6 +2023,8 @@ gfc_get_caf_token_offset (gfc_se *se, tree *token, tree
*offset, tree caf_decl,
     {
       gcc_assert (GFC_TYPE_ARRAY_AKIND (TREE_TYPE (caf_decl))
                    == GFC_ARRAY_ALLOCATABLE
+                 || GFC_TYPE_ARRAY_AKIND (TREE_TYPE (caf_decl))
+                   == GFC_ARRAY_POINTER
                  || expr->symtree->n.sym->attr.select_type_temporary);
       *token = gfc_conv_descriptor_token (caf_decl);
     }

There also exists GFC_ARRAY_POINTER_CONT, but I do not understand well enough
whether it is needed in this place and several others in that file.

Reply via email to