aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2022-03-02 19:13:43 -0500
committerNathan Sidwell <nathan@acm.org>2022-03-04 10:15:18 -0500
commit73baba1ae1b8f3618c2d3b674117b8a462e0ca76 (patch)
tree6bef001d2cbd8c83d7487248c9e6436e2a46da0d /gcc/fortran
parentf1b3e3853329b58fb2e50c17487df2ecbc4a5608 (diff)
downloadgcc-73baba1ae1b8f3618c2d3b674117b8a462e0ca76.zip
gcc-73baba1ae1b8f3618c2d3b674117b8a462e0ca76.tar.gz
gcc-73baba1ae1b8f3618c2d3b674117b8a462e0ca76.tar.bz2
c++: New module mangling ABI
This implements a new module mangling ABI as the original one has a few issues: a) it was not demangleable (oops) b) implemented a weak ownership model. This implements a strong ownership model, so that exported entities from named modules are mangled to include their module attachment. This gives more informative linker diagnostics and better module isolation. Weak ownership was hoped to allow backwards compatibility with non-modular code, but in practice was very brittle, and C++20 added new semantics for linkage declarations that cover the needed functionality. FAOD Clang is also moving to this ABI and documentation will be added to the Itanium ABI specification. gcc/cp/ * cp-tree.h (mangle_identifier): Replace with ... (mangle_module_component): ... this. * mangle.cc (dump_substitution_candidates): Adjust. (add_substitution): Likewise. (find_substitution): Likewise. (unmangled_name_p): Likewise. (mangle_module_substitution): Reimplement. (mangle_module_component): New. (write_module, maybe_write_module): Adjust. (write_name): Drop modules here. (write_unqualified): Do them here instead. (mangle_global_init): Adjust. * module.cc (module_state::mangle): Adjust. (mangle_module): Likewise. (get_originating_module): Adjust. gcc/testsuite/ * g++.dg/modules/fn-inline-1_b.C: Adjust. * g++.dg/modules/fn-inline-1_c.C: Adjust. * g++.dg/modules/imp-inline-1_a.C: Adjust. * g++.dg/modules/imp-inline-1_b.C: Adjust. * g++.dg/modules/init-2_a.C: Adjust. * g++.dg/modules/init-2_b.C: Adjust. * g++.dg/modules/init-2_c.C: Adjust. * g++.dg/modules/member-def-2_d.C: Adjust. * g++.dg/modules/mod-sym-1.C: Adjust. * g++.dg/modules/mod-sym-2.C: Adjust. * g++.dg/modules/mod-sym-3.C: Adjust. * g++.dg/modules/sym-subst-1.C: Adjust. * g++.dg/modules/sym-subst-2_b.C: Adjust. * g++.dg/modules/sym-subst-3_a.C: Adjust. * g++.dg/modules/sym-subst-3_b.C: Adjust. * g++.dg/modules/sym-subst-4.C: Adjust. * g++.dg/modules/sym-subst-5.C: Adjust. * g++.dg/modules/sym-subst-6.C: Adjust. * g++.dg/modules/tpl-spec-1_a.C: Adjust. * g++.dg/modules/tpl-spec-2_b.C: Adjust. * g++.dg/modules/tpl-spec-2_d.C: Adjust. * g++.dg/modules/tpl-spec-3_a.C: Adjust. * g++.dg/modules/virt-1_a.C: Adjust. * g++.dg/modules/virt-2_a.C: Adjust. * g++.dg/modules/virt-2_b.C: Adjust. * g++.dg/modules/virt-2_c.C: Adjust. * g++.dg/modules/vtt-1_a.C: Adjust. * g++.dg/modules/vtt-1_b.C: Adjust.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions