]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c/16676 (ICE with nested functions and -g1, blocks glibc)
authorBen Elliston <bje@au.ibm.com>
Tue, 10 May 2005 00:01:46 +0000 (00:01 +0000)
committerBen Elliston <bje@gcc.gnu.org>
Tue, 10 May 2005 00:01:46 +0000 (10:01 +1000)
PR debug/16676
* dwarf2out.c (dwarf2out_decl): Always set context_die to NULL,
even when debug_info_level is DINFO_LEVEL_TERSE.

[testsuite]
* gcc.dg/debug/pr16676.c: New test.

From-SVN: r99480

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

index b75e41f7d22d31e7a537b1bdb8c45ce69b4836b9..4e711521d14f29cb2e51fd988af85cddc754cef5 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-10  Ben Elliston  <bje@au.ibm.com>
+
+       PR debug/16676
+       * dwarf2out.c (dwarf2out_decl): Always set context_die to NULL,
+       even when debug_info_level is DINFO_LEVEL_TERSE.
+
 2005-05-08  Stephane Carrez  <stcarrez@nerim.fr>
 
        * config/m68hc11/m68hc11.c (m68hc11_z_replacement): Use emit_insn_after
index d59cc1d3ab57ae7c6df4a5302fcb62a18372ed6d..7fae71bbd3505f56911b1e51214b1aa290259c6a 100644 (file)
@@ -12377,10 +12377,8 @@ dwarf2out_decl (tree decl)
       /* If we're a nested function, initially use a parent of NULL; if we're
         a plain function, this will be fixed up in decls_for_scope.  If
         we're a method, it will be ignored, since we already have a DIE.  */
-      if (decl_function_context (decl)
-         /* But if we're in terse mode, we don't care about scope.  */
-         && debug_info_level > DINFO_LEVEL_TERSE)
-       context_die = NULL;
+      if (decl_function_context (decl))
+         context_die = NULL;
       break;
 
     case VAR_DECL:
index 1ee2e6f363872ceecbf58dfd5ff78132105af652..a92b89c083494c9787f2225f930c553f1ae95746 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-10  Ben Elliston  <bje@au.ibm.com>
+
+       PR debug/16676
+       * gcc.dg/debug/pr16676.c: New test.
+
 2005-05-08  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/21427
diff --git a/gcc/testsuite/gcc.dg/debug/pr16676.c b/gcc/testsuite/gcc.dg/debug/pr16676.c
new file mode 100644 (file)
index 0000000..a975885
--- /dev/null
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+
+void foo (void) { 
+  void nested () {} 
+}