+2016-10-05 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/57910
+ * trans-expr.c (gfc_add_interface_mapping): Don't try to
+ dereference call-by-value scalar argument
+
2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
PR fortran/58991
if (sym->attr.flavor == FL_PROCEDURE)
value = se->expr;
+ /* If the argument is a pass-by-value scalar, use the value as is. */
+ else if (!sym->attr.dimension && sym->attr.value)
+ value = se->expr;
+
/* If the argument is either a string or a pointer to a string,
convert it to a boundless character type. */
else if (!sym->attr.dimension && sym->ts.type == BT_CHARACTER)
+2016_10-06 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/57910
+ * gfortran.dg/pr57910.f90: New test.
+
2016-10-06 Jakub Jelinek <jakub@redhat.com>
* g++.dg/cpp1z/has-unique-obj-representations1.C: New test.
--- /dev/null
+! { dg-do run }
+program strtest
+
+ implicit none
+
+ character(len=:), allocatable:: my_str
+
+ integer, parameter :: slen_init = 7
+ integer :: slen = slen_init
+
+ my_str = fstr(slen)
+ if (slen /= slen_init .or. len(my_str) /= slen .or. my_str /= ' ') then
+ call abort
+ endif
+
+contains
+
+ function fstr(strlen)
+ integer, value :: strlen
+ character(len=strlen)::fstr
+
+ strlen = 17 ! Make sure strlen was really passed by value
+ fstr = ' '
+ end function fstr
+
+end program strtest