+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>
PR fortran/50069
DECL_CONTEXT (token) = sym->ns->proc_name->backend_decl;
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);
else
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>
PR rtl-optimization/79121
--- /dev/null
+! { 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