re PR c++/39153 (virtual default dtor not defined)
PR c++/39153 * decl2.c (cp_write_global_declarations): Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL. From-SVN: r144119
This commit is contained in:
parent
c8619fe964
commit
bff54b1987
|
@ -1,5 +1,9 @@
|
|||
2009-02-11 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/39153
|
||||
* decl2.c (cp_write_global_declarations):
|
||||
Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
|
||||
|
||||
PR c++/30111
|
||||
* init.c (build_value_init_noctor): Split out from...
|
||||
(build_value_init): ...here.
|
||||
|
|
|
@ -3487,7 +3487,7 @@ cp_write_global_declarations (void)
|
|||
for (i = 0; VEC_iterate (tree, deferred_fns, i, decl); ++i)
|
||||
{
|
||||
/* Does it need synthesizing? */
|
||||
if (DECL_ARTIFICIAL (decl) && ! DECL_INITIAL (decl)
|
||||
if (DECL_DEFAULTED_FN (decl) && ! DECL_INITIAL (decl)
|
||||
&& (! DECL_REALLY_EXTERN (decl) || possibly_inlined_p (decl)))
|
||||
{
|
||||
/* Even though we're already at the top-level, we push
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2009-02-11 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/39153
|
||||
* g++.dg/cpp0x/defaulted9.C: New test.
|
||||
|
||||
PR c++/30111
|
||||
* g++.dg/init/value7.C: New test.
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// PR c++/39153
|
||||
|
||||
struct _Impl_base
|
||||
{
|
||||
_Impl_base() = default;
|
||||
virtual ~_Impl_base() = default;
|
||||
};
|
||||
|
||||
template<typename _Tp>
|
||||
class _Impl : public _Impl_base
|
||||
{ };
|
||||
|
||||
int main()
|
||||
{
|
||||
_Impl<int> i;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue