This was already fixed by the patch for PR82375 on trunk, albeit less well than the patch applied here. I will correct trunk tomorrow.
Committed as 'obvious' on 6-branch(r254393) and 7-branch(r254389) after bootstrapping and regtesting. Cheers Paul 2017-11-03 Paul Thomas <pa...@gcc.gnu.org> PR fortran/81735 * trans-decl.c (gfc_trans_deferred_vars): Correct case where 'tmp' can be used unititialized. 2017-11-03 Paul Thomas <pa...@gcc.gnu.org> PR fortran/81735 * gfortran.dg/pr81735.f90: New test.