On 1/14/19 10:41 AM, Marek Polacek wrote:
On Mon, Jan 14, 2019 at 12:10:14PM +0100, Jakub Jelinek wrote:
On Sun, Jan 13, 2019 at 09:07:00PM -0500, Marek Polacek wrote:
diff --git gcc/cp/decl2.c gcc/cp/decl2.c
index e4cf4e0a361..7b656712471 100644
--- gcc/cp/decl2.c
+++ gcc/cp/decl2.c
@@ -2229,7 +2229,8 @@ maybe_emit_vtables (tree ctype)
never get generated. */
if (CLASSTYPE_PURE_VIRTUALS (ctype)
&& TYPE_HAS_NONTRIVIAL_DESTRUCTOR (ctype)
- && DECL_DEFAULTED_IN_CLASS_P(CLASSTYPE_DESTRUCTOR(ctype)))
+ && !CLASSTYPE_LAZY_DESTRUCTOR (ctype)
+ && DECL_DEFAULTED_IN_CLASS_P (CLASSTYPE_DESTRUCTOR (ctype)))
note_vague_linkage_fn (CLASSTYPE_DESTRUCTOR(ctype));
Just a formatting nit. s/CLASSTYPE_DESTRUCTOR/& / on the above line too
when you are at it. Otherwise I came up with identical patch to yours
(should have noticed the PR is ASSIGNED :( ).
:( I missed the second formatting problem, fixed here:
2019-01-14 Marek Polacek <pola...@redhat.com>
PR c++/88830 - ICE with abstract class.
* decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
Fix formatting.
OK.
Jason