gcc/libgfortran
Andre Vehreschild de91486c74 re PR fortran/78781 ([Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588)
gcc/fortran/ChangeLog:

2017-01-07  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR 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  <vehre@gcc.gnu.org>

	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  <vehre@gcc.gnu.org>

	* 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.

From-SVN: r244196
2017-01-07 18:26:58 +01:00
..
caf re PR fortran/78781 ([Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588) 2017-01-07 18:26:58 +01:00
config Update copyright years. 2017-01-01 13:07:43 +01:00
generated Update copyright years. 2017-01-01 13:07:43 +01:00
ieee Update copyright years. 2017-01-01 13:07:43 +01:00
intrinsics PR 78534 Revert r244011 2017-01-03 20:01:30 +02:00
io PR 78534 Revert r244011 2017-01-03 20:01:30 +02:00
m4 Update copyright years. 2017-01-01 13:07:43 +01:00
runtime Update copyright years. 2017-01-01 13:07:43 +01:00
ChangeLog re PR fortran/78781 ([Coarray] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1588) 2017-01-07 18:26:58 +01:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013 Rotate ChangeLog for 2013. 2014-06-17 06:55:59 +03:00
ChangeLog-2014 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2015 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2016 Update copyright years. 2017-01-01 13:07:43 +01:00
Makefile.am Makefile.am: Remove ISO_C_BINDING runtime functions. 2016-12-19 16:03:53 +00:00
Makefile.in * Makefile.in: Regenerate. 2016-12-19 16:04:19 +00:00
acinclude.m4 re PR libfortran/78379 (Processor-specific versions for matmul) 2016-12-03 09:44:35 +00:00
aclocal.m4 Disable hwcaps on libgfortran 2016-12-12 13:40:21 +00:00
c99_protos.h Update copyright years. 2017-01-01 13:07:43 +01:00
config.h.in re PR libfortran/78379 (Processor-specific versions for matmul) 2016-12-03 09:44:35 +00:00
configure Disable hwcaps on libgfortran 2016-12-12 13:40:21 +00:00
configure.ac Disable hwcaps on libgfortran 2016-12-12 13:40:21 +00:00
configure.host configure.host (ieee_flags): Add -mieee for alpha*. 2014-07-02 10:45:08 +02:00
gfortran.map iresolve.c (gfc_resolve_ftell): Call "ftell" instead of "ftell2". 2016-12-21 09:35:57 +00:00
kinds-override.h Update copyright years. 2017-01-01 13:07:43 +01:00
libgfortran.h PR 78534 Revert r244011 2017-01-03 20:01:30 +02:00
libgfortran.spec.in
libtool-version re PR libfortran/77828 (Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes when containing write to string) 2016-10-24 21:42:29 +00:00
mk-kinds-h.sh
mk-sik-inc.sh
mk-srk-inc.sh