aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorNathaniel Shead <nathanieloshead@gmail.com>2025-01-31 21:19:45 +1100
committerNathaniel Shead <nathanieloshead@gmail.com>2025-02-14 12:14:15 +1100
commit12feb78be517472ca941953dce47d6e78e5a17f8 (patch)
treec074f43f986550bbdf29c16fc42162786b67c093 /gcc/tree-vect-loop.cc
parent397c56af99e1675fc682606b280e53feafd07be0 (diff)
downloadgcc-12feb78be517472ca941953dce47d6e78e5a17f8.zip
gcc-12feb78be517472ca941953dce47d6e78e5a17f8.tar.gz
gcc-12feb78be517472ca941953dce47d6e78e5a17f8.tar.bz2
c++: Fix mangling of lambas in static member template initializers [PR107741]
My fix for this issue in r15-7147 turns out to not be quite sufficient; static member templates apparently go down a different code path and need their own handling. PR c++/107741 gcc/cp/ChangeLog: * cp-tree.h (is_static_data_member_initialized_in_class): Declare new predicate. * decl2.cc (start_initialized_static_member): Push the TEMPLATE_DECL when appropriate. (is_static_data_member_initialized_in_class): New predicate. (finish_initialized_static_member): Use it. * lambda.cc (record_lambda_scope): Likewise. * parser.cc (cp_parser_init_declarator): Start the member decl early for static members so that lambda scope is set. (cp_parser_template_declaration_after_parameters): Don't register in-class initialized static members here. gcc/testsuite/ChangeLog: * g++.dg/abi/lambda-ctx2-19.C: Add tests for template members. * g++.dg/abi/lambda-ctx2-19vs20.C: Likewise. * g++.dg/abi/lambda-ctx2-20.C: Likewise. * g++.dg/abi/lambda-ctx2.h: Likewise. * g++.dg/cpp0x/static-member-init-1.C: Likewise. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com> Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions