dwarf2out.c (dwarf2out_finish): Accept namespaces as context of limbo die nodes.
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: r121979
This commit is contained in:
parent
5ad17e7d5a
commit
db9e0d2af6
@ -1,3 +1,8 @@
|
||||
2007-02-15 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* dwarf2out.c (dwarf2out_finish): Accept namespaces as context of
|
||||
limbo die nodes.
|
||||
|
||||
2007-02-14 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* emit-rtl.c (set_mem_attributes_minus_bitpos): Treat complex
|
||||
|
@ -14375,7 +14375,9 @@ dwarf2out_finish (const char *filename)
|
||||
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)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2007-02-15 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* g++.dg/ext/interface4.C, g++.dg/ext/interface4.h: New.
|
||||
|
||||
2007-02-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* g++.dg/tree-ssa/nothrow-1.C: Skip test if -fpic/-fPIC is used.
|
||||
|
13
gcc/testsuite/g++.dg/ext/interface4.C
Normal file
13
gcc/testsuite/g++.dg/ext/interface4.C
Normal file
@ -0,0 +1,13 @@
|
||||
/* 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 ( );
|
||||
}
|
8
gcc/testsuite/g++.dg/ext/interface4.h
Normal file
8
gcc/testsuite/g++.dg/ext/interface4.h
Normal file
@ -0,0 +1,8 @@
|
||||
#pragma interface
|
||||
namespace N {
|
||||
typedef int A;
|
||||
}
|
||||
inline void g ( ) {
|
||||
static N :: A a = 0;
|
||||
a = a;
|
||||
}
|
Loading…
Reference in New Issue
Block a user