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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For the streaming itself it could be something like:
--- a/gcc/lto-streamer-out.cc   2026-07-20 09:57:50.693934604 +0200
+++ b/gcc/lto-streamer-out.cc   2026-09-14 18:51:29.227337823 +0200
@@ -560,6 +560,12 @@ lto_is_streamable (tree expr)
 {
   enum tree_code code = TREE_CODE (expr);

+  /* Allow streaming C++ std::meta::info.  */
+  if (code == LANG_TYPE
+      && TYPE_NAME (expr)
+      && TREE_CODE (TYPE_NAME (expr)) == IDENTIFIER_NODE
+      && id_equal (TYPE_NAME (expr), "decltype(^^int)"))
+    return true;
   /* Notice that we reject SSA_NAMEs as well.  We only emit the SSA
      name version in lto_output_tree_ref (see output_ssa_names).  */
   return !is_lang_specific (expr)

I wish we haven't abused LANG_TYPE here and really used META_TYPE in the
middle-end.
Because having is_lang_specific return true for LANG_TYPE is natural.

Reply via email to