This fixes an ICE seen e.g. with gcc.dg/analyzer/data-model-16.c when
enabling -fdump-analyzer.
gcc/analyzer/ChangeLog:
* region-model.cc (region_model::get_representative_path_var):
Implement case RK_LABEL.
* region-model.h (label_region::get_label): New accessor.
return path_var (function_reg->get_fndecl (), 0);
}
case RK_LABEL:
- gcc_unreachable (); // TODO
+ {
+ const label_region *label_reg = as_a <const label_region *> (reg);
+ return path_var (label_reg->get_label (), 0);
+ }
case RK_SYMBOLIC:
{
void dump_to_pp (pretty_printer *pp, bool simple) const FINAL OVERRIDE;
enum region_kind get_kind () const FINAL OVERRIDE { return RK_LABEL; }
+ tree get_label () const { return m_label; }
+
private:
tree m_label;
};