[Bug fortran/77871] [8/9/10/11 Regression] [Coarray] [OOP] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1981
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jun 28 19:08:43 GMT 2020
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.
More information about the Gcc-bugs
mailing list