https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93349

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Within the analyzer exploded_graph::process_node has:
2312      /* Update cfun and input_location in case of an ICE: make it easier
to
2313         track down which source construct we're failing to handle.  */
2314      auto_cfun sentinel (node->get_function ());
2315      const gimple *stmt = point.get_stmt ();
2316      if (stmt)
2317        input_location = stmt->location;

It resets cfun, but never resets input_location.

input_location is later used by gimplify_expr, called via gimplify_and_add
within omp-simd-clone.c, which has:
14492         if (!gimple_seq_empty_p (*pre_p))
14493           annotate_all_with_location_after (*pre_p, pre_last_gsi,
input_location);

thus using whatever the value of input_location.

Presumably this code is implicitly assuming that input_location is some
arbitrary value *not* in the block tree, which is violated by the analyzer code
above.

Reply via email to