public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [debug-early] fix problem with template parameter packs
@ 2015-05-05  2:29 Aldy Hernandez
  2015-05-05 21:08 ` Jason Merrill
  0 siblings, 1 reply; 21+ messages in thread
From: Aldy Hernandez @ 2015-05-05  2:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Biener, jason merrill

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

The code handling parameter DIEs needed a little tweaking for variable 
length template arguments.  I've relaxed the original assert, but this 
may require tweaking at branch review time-- hopefully later this week.

Committing to branch.

Aldy

p.s. Richi/Jason: Winter is coming.  Down to 1 GCC regression which is 
actually a missed DIE optimization which I hope I can fix post merge.

[-- Attachment #2: curr --]
[-- Type: text/plain, Size: 827 bytes --]

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c51cea1..a5b155f 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -18018,8 +18018,20 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,
 	 DW_AT_abstract_origin.  */
       if (parm_die && parm_die->die_parent != context_die)
 	{
-	  gcc_assert (!DECL_ABSTRACT_P (node));
-	  parm_die = NULL;
+	  if (!DECL_ABSTRACT_P (node))
+	    {
+	      gcc_assert (!DECL_ABSTRACT_P (node));
+	      parm_die = NULL;
+	    }
+	  else
+	    {
+	      /* Reuse DIE even with a differing context.  This
+		 happens when called through
+		 dwarf2out_abstract_function for
+		 formal parameter packs.  */
+	      gcc_assert (parm_die->die_parent->die_tag
+			  == DW_TAG_GNU_formal_parameter_pack);
+	    }
 	}
 
       if (parm_die && parm_die->die_parent == NULL)

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-06-05 16:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05  2:29 [debug-early] fix problem with template parameter packs Aldy Hernandez
2015-05-05 21:08 ` Jason Merrill
2015-05-05 21:33   ` Aldy Hernandez
2015-05-06 16:28     ` Jason Merrill
2015-05-26 17:02       ` Aldy Hernandez
2015-05-27 20:09         ` Jason Merrill
2015-05-28  8:19           ` Richard Biener
2015-06-03 13:05           ` Aldy Hernandez
2015-06-03 13:18             ` Richard Biener
2015-06-03 14:55               ` Aldy Hernandez
2015-06-04 18:39                 ` Jason Merrill
2015-06-04 18:57                   ` Jason Merrill
2015-06-05  1:53                     ` Aldy Hernandez
2015-06-05 11:02                       ` Aldy Hernandez
2015-06-05 14:02                       ` Jason Merrill
2015-06-05 15:24                         ` Aldy Hernandez
2015-06-05 16:32                           ` Jason Merrill
2015-06-05 16:54                             ` Aldy Hernandez
2015-06-05 17:05                               ` Jason Merrill
2015-06-04 22:21                 ` Jason Merrill
2015-06-05  5:00                   ` Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).