https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124233
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> ```
> static std::string
> generate_tree_str (tree value)
> {
> pretty_printer pp;
> dump_generic_node (&pp, t, 0, flags, true);
dump_generic_node (&pp, value, 0, TDF_NONE, true);
> std::string result = pp_formatted_text (&pp);
>
> if (!result.empty () && result.back () == '\n')
> result.pop_back ();
>
> return result;
> }
> ```
