On 7/3/26 3:12 AM, Jakub Jelinek wrote:
On Thu, Jul 02, 2026 at 01:21:31PM -0400, Jason Merrill wrote:
                        if (tsubst_decomp_names (decl, pattern_decl, args,
                                                 complain, in_decl, decomp)
                            == error_mark_node)
-                         decomp = NULL;
+                         {
+                           decomp = NULL;
+                           if (TREE_STATIC (decl))
+                             {
+                               tree id = get_identifier ("<decomp>");
+                               SET_DECL_ASSEMBLER_NAME (decl, id);

How about doing this in tsubst_decomp_names?

So like this?  The patch is larger because tsubst_decomp_names
can return error_mark_node in 2 spots rather than just one, and
worse it overwrites the decl argument in that case to error_mark_node
so that we don't know what to check TREE_STATIC on and what to
SET_DECL_ASSEMBLER_NAME on.

Yeah, let's stick with the v1 patch, just add a comment

/* As in cp_finish_decomp.  */

Jason

Reply via email to