* dwarf2out.c (gen_formal_parameter_die): Remove assert.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 24 Jun 2015 15:58:13 +0000 (15:58 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Wed, 24 Jun 2015 15:58:13 +0000 (15:58 +0000)
From-SVN: r224907

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c [new file with mode: 0644]

index cb889e2b7994365fd349623a2b869c1a3d74223f..40e73c910826f0b60c824d4e02594196e32787ae 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-24  Aldy Hernandez  <aldyh@redhat.com>
+
+       PR debug/66482
+       * dwarf2out.c (gen_formal_parameter_die): Remove assert.
+
 2015-06-24  Ilya Enkovich  <enkovich.gnu@gmail.com>
 
        * tree-vect-slp.c (vect_build_slp_tree_1): Init vectype.
index 360f67f151ccda4287449f66c907d0401abc0a85..843fc1e85fb58a93b13934f31db022b043676c73 100644 (file)
@@ -18021,18 +18021,14 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,
            {
              /* FIXME: Reuse DIE even with a differing context.
 
-                This happens when called through
-                dwarf2out_abstract_function for formal parameter
-                packs.  The issue is that we're calling
+                This can happen when calling
                 dwarf2out_abstract_function to build debug info for
                 the abstract instance of a function for which we have
                 already generated a DIE in
                 dwarf2out_early_global_decl.
 
-                Once we remove dwarf2out_abstract_function, this
-                gcc_assert should be a gcc_unreachable.  */
-             gcc_assert (parm_die->die_parent->die_tag
-                         == DW_TAG_GNU_formal_parameter_pack);
+                Once we remove dwarf2out_abstract_function, we should
+                have a call to gcc_unreachable here.  */
            }
        }
 
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr66482.c
new file mode 100644 (file)
index 0000000..880791c
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -gdwarf" } */
+
+void f(int p) {}
+int g() {
+  void f();
+  g();
+  return 0;
+}