Check that there is a DECL_INITIAL associated with prev_stmt before using it.
2022-04-15 Kwok Cheung Yeung <kcy@codesourcery.com>
gcc/c-family/
* c-omp.cc (check_and_annotate_for_loop): Check that the DECL_INITIAL
is non-NULL before using.
+2022-04-15 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ gcc/c-family/
+ * c-omp.cc (check_and_annotate_for_loop): Check that the DECL_INITIAL
+ is non-NULL before using.
+
2022-05-12 Jakub Jelinek <jakub@redhat.com>
Backport from mainline:
unlink_prev = true;
}
else if (is_local_var (prev_stmt)
+ && DECL_INITIAL (prev_stmt)
&& !TREE_SIDE_EFFECTS (DECL_INITIAL (prev_stmt)))
{
/* If the preceding statement is the declaration of the loop