http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57912
Bug ID: 57912 Summary: gfortran/coarray/alloc_comp_2.f90 ICE Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: belagod at gcc dot gnu.org On the trunk, gfortran(f951) ICEs when compiled with .../obj/gcc/f951 .../gcc/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90 -fcoarray=lib -O2 __copy_parent_coarray_component_Child .../gcc/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90:17:0: internal compiler error: in gfc_trans_scalar_assign, at fortran/trans-expr.c:6862 class(child) this ^ 0x566d2f translate_all_program_units ../../gcc/gcc/fortran/parse.c:4496 0x566d2f gfc_parse_file() ../../gcc/gcc/fortran/parse.c:4706 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. This ICE goes away when this commit is reversed: commit 435feecde2fc6bf5627aad91805bbd69ddbbe830 Author: burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Mon Jul 15 08:25:48 2013 +0000 2013-07-15 Tobias Burnus <bur...@net-b.de> * trans-array.h (gfc_deallocate_alloc_comp_no_caf, gfc_reassign_alloc_comp_caf): New prototype. * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF and COPY_ALLOC_COMP_CAF. (structure_alloc_comps): Handle it. (gfc_reassign_alloc_comp_caf, gfc_deallocate_alloc_comp_no_caf): New function. (gfc_alloc_allocatable_for_assignment): Call it. * trans-expr.c (gfc_trans_scalar_assign, gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto. * parse.c (parse_derived): Correctly set coarray_comp. * resolve.c (resolve_symbol): Improve error wording. 2013-07-15 Tobias Burnus <bur...@net-b.de> * gfortran.dg/coarray_lib_realloc_1.f90: New. * gfortran.dg/coarray/lib_realloc_1.f90: New. * gfortran.dg/coarray_6.f90: Add dg-error. I observed this behaviour on a trunk compiler built native on x86_64-unknown-linux-gnu.