[Bug fortran/78781] [7 Regression] [Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78781 vehre at gcc dot gnu.org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED --- Comment #6 from vehre at gcc dot gnu.org --- No regressions reported so far, closing.
[Bug fortran/78781] [7 Regression] [Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78781 --- Comment #5 from vehre at gcc dot gnu.org --- Waiting one week for regression reports before closing.
[Bug fortran/78781] [7 Regression] [Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78781 --- Comment #4 from vehre at gcc dot gnu.org --- Author: vehre Date: Sat Jan 7 17:26:58 2017 New Revision: 244196 URL: https://gcc.gnu.org/viewcvs?rev=244196=gcc=rev Log: gcc/fortran/ChangeLog: 2017-01-07 Andre VehreschildPR fortran/78781 PR fortran/78935 * expr.c (gfc_check_pointer_assign): Return the same error message for rewritten coarray pointer assignments like for plain ones. * gfortran.h: Change prototype. * primary.c (caf_variable_attr): Set attributes used ones only only ones. Add setting of pointer_comp attribute. (gfc_caf_attr): Add setting of pointer_comp attribute. * trans-array.c (gfc_array_allocate): Add flag that the component to allocate is not an ultimate coarray component. Add allocation of pointer arrays. (structure_alloc_comps): Extend nullify to treat pointer components in coarrays correctly. Restructure nullify to remove redundant code. (gfc_nullify_alloc_comp): Allow setting caf_mode flags. * trans-array.h: Change prototype of gfc_nullify_alloc_comp (). * trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for derived type coarrays with pointer components. * trans-expr.c (gfc_trans_structure_assign): Also treat pointer components. (trans_caf_token_assign): Handle assignment of token of scalar pointer components. (gfc_trans_pointer_assignment): Call above routine. * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer components. (gfc_conv_intrinsic_caf_get): Likewise. (conv_caf_send): Likewise. * trans-stmt.c (gfc_trans_allocate): After allocating a derived type in a coarray pre-register the tokens. (gfc_trans_deallocate): Simply determining the coarray type (scalar or array) and deregistering it correctly. * trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the actual codim to allow lookup of array types in the cache. (gfc_build_array_type): Likewise. (gfc_get_array_descriptor_base): Likewise. (gfc_get_array_type_bounds): Likewise. (gfc_get_derived_type): Likewise. * trans-types.h: Likewise. * trans.c (gfc_deallocate_with_status): Enable deregistering of all kind of coarray components. (gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode instead of caf_deregister. libgfortran/ChangeLog: 2017-01-07 Andre Vehreschild PR fortran/78781 PR fortran/78935 * caf/single.c (send_by_ref): Fix addressing of non-allocatable scalar destination components. gcc/testsuite/ChangeLog: 2017-01-07 Andre Vehreschild * gfortran.dg/coarray/ptr_comp_1.f08: New test. * gfortran.dg/coarray/ptr_comp_2.f08: New test. * gfortran.dg/coarray/ptr_comp_3.f08: New test. * gfortran.dg/coarray/ptr_comp_4.f08: New test. * gfortran.dg/coarray_ptr_comp_1.f08: New test. * gfortran.dg/coarray_ptr_comp_2.f08: New test. * gfortran.dg/coarray_ptr_comp_3.f08: New test. Added: trunk/gcc/testsuite/gfortran.dg/coarray/ptr_comp_1.f08 trunk/gcc/testsuite/gfortran.dg/coarray/ptr_comp_2.f08 trunk/gcc/testsuite/gfortran.dg/coarray/ptr_comp_3.f08 trunk/gcc/testsuite/gfortran.dg/coarray/ptr_comp_4.f08 trunk/gcc/testsuite/gfortran.dg/coarray_ptr_comp_1.f08 trunk/gcc/testsuite/gfortran.dg/coarray_ptr_comp_2.f08 trunk/gcc/testsuite/gfortran.dg/coarray_ptr_comp_3.f08 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/expr.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/primary.c trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-array.h trunk/gcc/fortran/trans-decl.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans-intrinsic.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/fortran/trans-types.c trunk/gcc/fortran/trans-types.h trunk/gcc/fortran/trans.c trunk/gcc/testsuite/ChangeLog trunk/libgfortran/ChangeLog trunk/libgfortran/caf/single.c
[Bug fortran/78781] [7 Regression] [Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78781 vehre at gcc dot gnu.org changed: What|Removed |Added Status|NEW |WAITING Assignee|unassigned at gcc dot gnu.org |vehre at gcc dot gnu.org --- Comment #3 from vehre at gcc dot gnu.org --- Patch and implementation for pointer components in derived type coarrays available at: https://gcc.gnu.org/ml/fortran/2016-12/msg00314.html Waiting for review.
[Bug fortran/78781] [7 Regression] [Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78781 janus at gcc dot gnu.org changed: What|Removed |Added CC||janus at gcc dot gnu.org Summary|[7 Regression] ICE in |[7 Regression] [Coarray] |gfc_deallocate_scalar_with_ |ICE in |status, at |gfc_deallocate_scalar_with_ |fortran/trans.c:1588|status, at ||fortran/trans.c:1588 --- Comment #2 from janus at gcc dot gnu.org --- This slightly simpler test case (without polymorphism) runs into the same ICE: module m type t integer, pointer :: z end type contains function f(x) type(t) :: x[*] if ( associated(x%z) ) deallocate(x%z) end end