[PATCH][fortran] PR 63701 Make sure variable is always used initialised

Kyrill Tkachov kyrylo.tkachov@arm.com
Tue Nov 11 11:00:00 GMT 2014


Hi all,

As this trivial PR says, found is not initialised, later conditionally 
set to true in the for loop that follows and gcc_asserted in the end.
It is expected that the found = true; statement will always be hit, but 
in case something elsewhere goes wrong and it is not, we want the 
gcc_assert to
use a properly initialised found = false value.

Ok for trunk?

Thanks,
Kyrill

2014-11-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     PR fortran/63701
     * trans-expr.c (gfc_get_tree_for_caf_expr): Initialise found to false.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init-found.patch
Type: text/x-patch
Size: 363 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141111/c6613faf/attachment.bin>


More information about the Gcc-patches mailing list