aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-06-27 05:15:01 -0400
committerJason Merrill <jason@redhat.com>2023-06-28 00:42:12 -0400
commitabdf0b6cdff5783b97f35ad61ae31433f0569dfd (patch)
tree883f684665687209e8f4b227992d40086420227c /gcc/fortran/trans-decl.cc
parent83f69969c0f3eb93302f6ef7714884db9079e803 (diff)
downloadgcc-abdf0b6cdff5783b97f35ad61ae31433f0569dfd.zip
gcc-abdf0b6cdff5783b97f35ad61ae31433f0569dfd.tar.gz
gcc-abdf0b6cdff5783b97f35ad61ae31433f0569dfd.tar.bz2
c++: inherited constructor attributes
Inherited constructors are like constructor clones; they don't exist from the language perspective, so they should copy the attributes in the same way. But it doesn't make sense to copy alias or ifunc attributes in either case. Unlike handle_copy_attribute, we do want to copy inlining attributes. The discussion of PR110334 pointed out that we weren't copying the always_inline attribute, leading to poor inlining choices. PR c++/110334 gcc/cp/ChangeLog: * cp-tree.h (clone_attrs): Declare. * method.cc (implicitly_declare_fn): Use it for inherited constructor. * optimize.cc (clone_attrs): New. (maybe_clone_body): Use it. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/nodiscard-inh1.C: New test.
Diffstat (limited to 'gcc/fortran/trans-decl.cc')
0 files changed, 0 insertions, 0 deletions