http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code CC|bur...@net-b.de |burnus at gcc dot gnu.org Summary|[4.8/4.9 Regression] [OOP] |[OOP] [F08] ICE on dummy |[F08] ICE on dummy argument |argument child class with |child class with coarray |coarray inside parent |inside parent | --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-12 09:20:57 UTC --- The following patch fixes that ICE - but it introduces a follow-up ICE: error: cannot convert to a pointer type in gcc/convert.c:81's convert_to_pointer for a component_ref of child->src->parent->dummy --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -7323,3 +7323,3 @@ duplicate_allocatable (tree dest, tree src, tree type, int rank, - if (rank == 0) + if (!GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (dest))) { @@ -7350,3 +7350,9 @@ duplicate_allocatable (tree dest, tree src, tree type, int rank, gfc_init_block (&block); - nelems = get_full_array_size (&block, src, rank); + + if (rank) + nelems = get_full_array_size (&block, src, rank); + else + /* Coarray scalar. */ + nelems = gfc_index_one_node; + tmp = fold_convert (gfc_array_index_type,