+2016-12-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/78757
+ * trans-expr.c (gfc_conv_procedure_call): Emit DECL_EXPR for the
+ type pstr var points to.
+
2016-12-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/78798
{
var = gfc_create_var (type, "pstr");
+ /* Emit a DECL_EXPR for the VLA type. */
+ tmp = TREE_TYPE (type);
+ if (TYPE_SIZE (tmp)
+ && TREE_CODE (TYPE_SIZE (tmp)) != INTEGER_CST)
+ {
+ tmp = build_decl (input_location, TYPE_DECL, NULL_TREE, tmp);
+ DECL_ARTIFICIAL (tmp) = 1;
+ DECL_IGNORED_P (tmp) = 1;
+ tmp = fold_build1_loc (input_location, DECL_EXPR,
+ TREE_TYPE (tmp), tmp);
+ gfc_add_expr_to_block (&se->pre, tmp);
+ }
+
if ((!comp && sym->attr.allocatable)
|| (comp && comp->attr.allocatable))
{
+2016-12-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/78757
+ * gfortran.dg/char_result_16.f90: New test.
+
2016-12-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/ubfiz_lsl_1.c: New test.
--- /dev/null
+! PR fortran/78757
+! { dg-do compile }
+! { dg-options "-O1" }
+
+program pr78757
+ implicit none
+ character (len = 30), target :: x
+ character (len = 30), pointer :: s
+ s => foo (30_8)
+contains
+ function foo (i)
+ integer (8) :: i
+ character (len = i), pointer :: foo
+ foo => x
+ end function foo
+end program pr78757