PR c++/17121
* decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
PR c++/17121
* g++.dg/inherit/local2.C: New test.
From-SVN: r86353
+2004-08-20 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/17121
+ * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
+
2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
PR c++/17120
&& TYPE_HAS_TRIVIAL_DESTRUCTOR (TREE_TYPE (decl)))
return;
- if (! toplevel_bindings_p ())
+ if (DECL_FUNCTION_SCOPE_P (decl))
{
/* Emit code to perform this initialization but once. */
tree if_stmt;
+2004-08-20 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/17121
+ * g++.dg/inherit/local2.C: New test.
+
2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
PR c++/17120
2004-08-20 Mark Mitchell <mark@codesourcery.com>
+ PR c++/17121
+ * g++.dg/inherit/local2.C: New test.
+
* gcc.dg/darwin-longlong.c: Include <stdlib.h>.
* gcc.dg/ppc-ldstruct.c: Likewise.
* gcc.dg/ppc64-abi-2.c: Likewise.
--- /dev/null
+// PR c++/17121
+
+struct A {
+ virtual ~A() {}
+};
+
+void tsk_tsk()
+{
+ struct B : public A {};
+}