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.tkac...@arm.com> PR fortran/63701 * trans-expr.c (gfc_get_tree_for_caf_expr): Initialise found to false.
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 18bc502..b36acbe 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1406,7 +1406,7 @@ tree gfc_get_tree_for_caf_expr (gfc_expr *expr) { tree caf_decl; - bool found; + bool found = false; gfc_ref *ref; gcc_assert (expr && expr->expr_type == EXPR_VARIABLE);