+2013-02-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53818
+ * resolve.c (apply_default_init_local): Don't create an
+ initializer for a result variable.
+
2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/56224
/* For saved variables, we don't want to add an initializer at function
entry, so we just add a static initializer. Note that automatic variables
- are stack allocated even with -fno-automatic. */
+ are stack allocated even with -fno-automatic; we have also to exclude
+ result variable, which are also nonstatic. */
if (sym->attr.save || sym->ns->save_all
- || (gfc_option.flag_max_stack_var_size == 0
+ || (gfc_option.flag_max_stack_var_size == 0 && !sym->attr.result
&& (!sym->attr.dimension || !is_non_constant_shape_array (sym))))
{
/* Don't clobber an existing initializer! */
+2013-02-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53818
+ * gfortran.dg/init_flag_11.f90: New.
+
2013-02-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc.dg/debug/dwarf2/pr53948.c: Allow for more whitespace.
--- /dev/null
+! { dg-do compile }
+! { dg-flags "-finit-local-zero -fno-automatic"
+!
+! PR fortran/53818
+!
+! Contributed by John Moyard
+!
+logical function testing(date1, date2) result(test)
+ integer date1, date2
+ test = ( (date1 < date2) .or. ( date1==date2 ))
+end function testing