gcc/ChangeLog:
* dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
limbo die nodes.
gcc/testsuite/ChangeLog:
* g++.dg/ext/interface4.C, g++.dg/ext/interface4.h: New.
From-SVN: r126139
+2007-06-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
+ limbo die nodes.
+
2007-06-28 Seongbae Park <seongbae.park@gmail.com>
* config/arm/arm.c (arm_get_frame_offsets): Set
else if (TYPE_P (node->created_for))
context = TYPE_CONTEXT (node->created_for);
- gcc_assert (context && TREE_CODE (context) == FUNCTION_DECL);
+ gcc_assert (context
+ && (TREE_CODE (context) == FUNCTION_DECL
+ || TREE_CODE (context) == NAMESPACE_DECL));
origin = lookup_decl_die (context);
if (origin)
+2007-06-30 Alexandre Oliva <aoliva@redhat.com>
+
+ * g++.dg/ext/interface4.C, g++.dg/ext/interface4.h: New.
+
2007-06-28 Seongbae Park <seongbae.park@gmail.com>
* gcc.target/arm/stack-corruption.c: New test.
--- /dev/null
+/* https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=227376 */
+
+/* { dg-do compile } */
+/* { dg-options "-g2" } */
+
+/* We used to crash when emitting debug info for type N::A because its
+ context was a namespace, not a function. */
+
+#include "interface4.h"
+
+void f ( ) {
+ g ( );
+}
--- /dev/null
+#pragma interface
+namespace N {
+ typedef int A;
+}
+inline void g ( ) {
+ static N :: A a = 0;
+ a = a;
+}