From 60b9991b6105eeba6f825a2d300a9c35d2bfdf81 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 9 Jul 2012 20:03:11 -0400 Subject: [PATCH] method.c (synthesized_method_walk): Avoid changing EH spec based on cleanups in other places, too. * method.c (synthesized_method_walk): Avoid changing EH spec based on cleanups in other places, too. From-SVN: r189395 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/method.c | 4 ++-- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/g++.dg/cpp0x/implicit13.C | 10 +++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1afef7a1bf1..e4c5506986c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-10 Jason Merrill + + * method.c (synthesized_method_walk): Avoid changing + EH spec based on cleanups in other places, too. + 2012-07-09 Sterling Augustine * error.c (lang_decl_name): Use TFF_UNQUALIFIED_NAME flag. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 0237456dcca..7ea2de9ac8e 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1315,7 +1315,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, { rval = locate_fn_flags (base_binfo, complete_dtor_identifier, NULL_TREE, flags, complain); - process_subob_fn (rval, false, spec_p, NULL, + process_subob_fn (rval, false, NULL, NULL, deleted_p, NULL, NULL, basetype); } @@ -1335,7 +1335,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, if (ctor_p) walk_field_subobs (TYPE_FIELDS (ctype), complete_dtor_identifier, sfk_destructor, TYPE_UNQUALIFIED, false, - false, false, spec_p, NULL, + false, false, NULL, NULL, deleted_p, NULL, NULL, flags, complain); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8f1b9311725..41e3c64ead9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-07-10 Jason Merrill + + * g++.dg/cpp0x/implicit13.C: Add vbase and member tests. + 2012-07-09 Sterling Augustine * g++.dg/debug/dwarf2/pubnames-2.C: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit13.C b/gcc/testsuite/g++.dg/cpp0x/implicit13.C index 96bc7706040..3165863c639 100644 --- a/gcc/testsuite/g++.dg/cpp0x/implicit13.C +++ b/gcc/testsuite/g++.dg/cpp0x/implicit13.C @@ -14,7 +14,7 @@ struct B: A { }; // { dg-final { scan-assembler-not "_ZN1BC1Ev" } } B b; -struct C { C() noexcept; ~C(); }; +struct C { C() noexcept; ~C() noexcept(false); }; struct D: C { }; extern D d; @@ -22,3 +22,11 @@ void *operator new(__SIZE_TYPE__, void*) noexcept; #define SA(X) static_assert((X),#X) SA(noexcept(new (&d) D)); + +struct E: virtual C { }; +extern E e; +SA(noexcept (new (&e) E)); + +struct F { C c; }; +extern F f; +SA(noexcept (new (&f) F)); -- 2.30.2