public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105224] New: [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash
@ 2022-04-11 16:18 aoliva at gcc dot gnu.org
  2023-02-17  7:56 ` [Bug c++/105224] " aoliva at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-04-11 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105224
           Summary: [modules] g++.dg/modules/virt-2_a.C: inline key
                    methods: c++ modules and arm aapcs clash
           Product: gcc
           Version: unknown
               URL: https://gcc.gnu.org/pipermail/gcc-patches/2022-April/5
                    92763.html
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aoliva at gcc dot gnu.org
            Blocks: 103524
  Target Milestone: ---
            Target: arm-eabi

g++.dg/modules/virt-2_a.C fails on arm-eabi and many other arm targets that use
the AAPCS variant.  ARM is the only target that overrides
TARGET_CXX_KEY_METHOD_MAY_BE_INLINE.  It's not clear to me which way the clash
between AAPCS and C++ Modules design should be resolved, but currently it
favors AAPCS and thus the test fails.

Skipping the test or conditionally dropping the inline keyword breaks
subsequent tests.  The patchlet in the URL XFAILs the expectations of the keyed
symbols on
arm*-*-*.
https://gcc.gnu.org/pipermail/gcc-patches/2022-April/592763.html


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/105224] [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash
  2022-04-11 16:18 [Bug c++/105224] New: [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash aoliva at gcc dot gnu.org
@ 2023-02-17  7:56 ` aoliva at gcc dot gnu.org
  2023-02-24 14:41 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: aoliva at gcc dot gnu.org @ 2023-02-17  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma
                   |il/gcc-patches/2022-April/5 |il/gcc-patches/2023-Februar
                   |92763.html                  |y/612175.html

--- Comment #1 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612175.html has a
refreshed and retested (xfail) patch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/105224] [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash
  2022-04-11 16:18 [Bug c++/105224] New: [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash aoliva at gcc dot gnu.org
  2023-02-17  7:56 ` [Bug c++/105224] " aoliva at gcc dot gnu.org
@ 2023-02-24 14:41 ` cvs-commit at gcc dot gnu.org
  2024-05-02  1:39 ` cvs-commit at gcc dot gnu.org
  2024-05-02  1:54 ` nshead at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-24 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:

https://gcc.gnu.org/g:3d1d3ece9bc5a1baa2feb4bf231b709c097b8434

commit r13-6329-g3d1d3ece9bc5a1baa2feb4bf231b709c097b8434
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Feb 24 11:31:05 2023 -0300

    [PR105224] C++ modules and AAPCS/ARM EABI clash on inline key methods

    g++.dg/modules/virt-2_a.C fails on arm-eabi and many other arm targets
    that use the AAPCS variant.  ARM is the only target that overrides
    TARGET_CXX_KEY_METHOD_MAY_BE_INLINE.  It's not clear to me which way
    the clash between AAPCS and C++ Modules design should be resolved, but
    currently it favors AAPCS and thus the test fails, so skip it on
    arm_eabi.


    for  gcc/testsuite/ChangeLog

            PR c++/105224
            * g++.dg/modules/virt-2_a.C: Skip on arm_eabi.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/105224] [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash
  2022-04-11 16:18 [Bug c++/105224] New: [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash aoliva at gcc dot gnu.org
  2023-02-17  7:56 ` [Bug c++/105224] " aoliva at gcc dot gnu.org
  2023-02-24 14:41 ` cvs-commit at gcc dot gnu.org
@ 2024-05-02  1:39 ` cvs-commit at gcc dot gnu.org
  2024-05-02  1:54 ` nshead at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-02  1:39 UTC (permalink / raw)
  To: gcc-bugs

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 <nshead@gcc.gnu.org>:

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

commit r15-98-gad30265ccfb211fca35789df2d1404cc12302219
Author: Nathaniel Shead <nathanieloshead@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 <nathanieloshead@gmail.com>
    Reviewed-by: Jason Merrill <jason@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/105224] [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash
  2022-04-11 16:18 [Bug c++/105224] New: [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash aoliva at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-02  1:39 ` cvs-commit at gcc dot gnu.org
@ 2024-05-02  1:54 ` nshead at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: nshead at gcc dot gnu.org @ 2024-05-02  1:54 UTC (permalink / raw)
  To: gcc-bugs

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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |15.0
                 CC|                            |nshead at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
The generic C++ ABI now ignores key function determination for classes attached
to named modules.  As far as I can see the AAPCS has no wording to the
contrary, so this issue should now be resolved for GCC 15.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-02  1:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 16:18 [Bug c++/105224] New: [modules] g++.dg/modules/virt-2_a.C: inline key methods: c++ modules and arm aapcs clash aoliva at gcc dot gnu.org
2023-02-17  7:56 ` [Bug c++/105224] " aoliva at gcc dot gnu.org
2023-02-24 14:41 ` cvs-commit at gcc dot gnu.org
2024-05-02  1:39 ` cvs-commit at gcc dot gnu.org
2024-05-02  1:54 ` nshead at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).