Commit 118d5ed3 by Andre Vehreschild

re PR fortran/70696 ([Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray)

gcc/fortran/ChangeLog:

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

	PR fortran/70696
	* trans-decl.c (gfc_build_qualified_array): Add static decl to parent
	function only, when the decl-context is not the translation unit.

gcc/testsuite/ChangeLog:

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

	PR fortran/70696
	* gfortran.dg/coarray_43.f90: New test.

From-SVN: r244637
parent 9db0a8c2
2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70696
* trans-decl.c (gfc_build_qualified_array): Add static decl to parent
function only, when the decl-context is not the translation unit.
2017-01-18 Louis Krupp <louis.krupp@zoho.com> 2017-01-18 Louis Krupp <louis.krupp@zoho.com>
PR fortran/50069 PR fortran/50069
......
...@@ -971,7 +971,9 @@ gfc_build_qualified_array (tree decl, gfc_symbol * sym) ...@@ -971,7 +971,9 @@ gfc_build_qualified_array (tree decl, gfc_symbol * sym)
DECL_CONTEXT (token) = sym->ns->proc_name->backend_decl; DECL_CONTEXT (token) = sym->ns->proc_name->backend_decl;
gfc_module_add_decl (cur_module, token); gfc_module_add_decl (cur_module, token);
} }
else if (sym->attr.host_assoc) else if (sym->attr.host_assoc
&& TREE_CODE (DECL_CONTEXT (current_function_decl))
!= TRANSLATION_UNIT_DECL)
gfc_add_decl_to_parent_function (token); gfc_add_decl_to_parent_function (token);
else else
gfc_add_decl_to_function (token); gfc_add_decl_to_function (token);
......
2017-01-19 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/70696
* gfortran.dg/coarray_43.f90: New test.
2017-01-19 Richard Earnshaw <rearnsha@arm.com> 2017-01-19 Richard Earnshaw <rearnsha@arm.com>
PR rtl-optimization/79121 PR rtl-optimization/79121
......
! { dg-do link }
! { dg-options "-fcoarray=lib -lcaf_single" }
program coarray_43
implicit none
integer, parameter :: STR_LEN = 50
character(len=STR_LEN) :: str[*]
integer :: pos
write(str,"(2(a,i2))") "Greetings from image ",this_image()," of ",num_images()
block
pos = scan(str[5], set="123456789")
end block
end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment