https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105224

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>:

https://gcc.gnu.org/g:ad30265ccfb211fca35789df2d1404cc12302219

commit r15-98-gad30265ccfb211fca35789df2d1404cc12302219
Author: Nathaniel Shead <nathanielosh...@gmail.com>
Date:   Tue Apr 16 22:50:26 2024 +1000

    c++: Implement modules ABI for vtable emissions

    This patch implements the changes described in
    https://github.com/itanium-cxx-abi/cxx-abi/pull/171.

    One restriction that is lifted in the ABI that hasn't been updated here
    is that the ABI no longer requires unique vtables to be emitted with
    vague linkage.  I haven't changed this behaviour for this patch, but in
    the future we could look into changing the relevant target hook
    ('class_data_always_comdat') to default to 'false'.  But the current
    behaviour is more forgiving to changes in key function identification.

    Since the ABI for vtables attached to named modules no longer depends on
    key methods, this also resolves the issue described in PR c++/105224.

            PR c++/105224

    gcc/cp/ChangeLog:

            * class.cc (finish_struct_1): Also push classes attached to a
            module into the 'keyed_classes' list.
            * decl.cc (record_key_method_defined): Don't push classes
            attached to a named module into the 'keyed_classes' list.
            * module.cc (trees_in::read_class_def): Likewise.
            * decl2.cc (import_export_class): Uniquely emit vtables for
            non-template classes attached to a named module.
            (vtables_uniquely_emitted): New function.
            (import_export_decl): Update comments. Update with knowledge
            about new kinds of uniquely emitted vtables.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/virt-2_a.C: Update linkage requirements.
            * g++.dg/modules/virt-2_b.C: Likewise.
            * g++.dg/modules/virt-2_c.C: Likewise.
            * g++.dg/modules/virt-4_a.C: New test.
            * g++.dg/modules/virt-4_b.C: New test.

    Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>
    Reviewed-by: Jason Merrill <ja...@redhat.com>
  • [Bug c++/105224] [modules] g++.... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to