do
{
changed = false;
- int idx = path->num_events () - 1;
+ int idx = (signed)path->num_events () - 1;
while (idx >= 0)
{
/* Prune [..., call, function-entry, return, ...] triples. */
if (flag_analyzer_verbose_edges)
return;
- for (unsigned start_idx = 0; start_idx < path->num_events () - 1; start_idx++)
+ for (int start_idx = 0;
+ start_idx < (signed)path->num_events () - 1;
+ start_idx++)
{
if (path->cfg_edge_pair_at_p (start_idx))
{
[start_idx, next_idx)
where all apart from the final event are on the same line,
and all are either TRUE or FALSE edges, matching the initial. */
- unsigned next_idx = start_idx + 2;
+ int next_idx = start_idx + 2;
while (path->cfg_edge_pair_at_p (next_idx)
&& same_line_as_p (start_exp_loc, path, next_idx))
{
--- /dev/null
+/* Regression test for hang with -fanalyzer-verbosity=0. */
+/* { dg-additional-options "-fanalyzer-verbosity=0" } */
+
+#include <stdlib.h>
+
+struct coord {
+ float x;
+ float y;
+};
+
+void test_34 (void)
+{
+ float *q;
+ struct coord *p = malloc (sizeof (struct coord));
+ if (!p)
+ return;
+ p->x = 0.0f;
+ q = &p->x;
+ free (p);
+ *q = 1.0f; /* { dg-warning "use after 'free' of 'q'" } */
+};