c++: copy location to AGGR_INIT_EXPR
commit52b4b7d7f5c7c09f5aaf3934978de9702d8c214b
authorJason Merrill <jason@redhat.com>
Wed, 13 Dec 2023 04:48:57 +0000 (12 23:48 -0500)
committerJason Merrill <jason@redhat.com>
Wed, 13 Dec 2023 16:25:13 +0000 (13 11:25 -0500)
tree2b9f14515fe9a5108f51944d6d9518ec50901087
parentd2b269ce30d77dbfc6c28c75887c330d4698b132
c++: copy location to AGGR_INIT_EXPR

When building an AGGR_INIT_EXPR from a CALL_EXPR, we shouldn't lose location
information.

gcc/cp/ChangeLog:

* tree.cc (build_aggr_init_expr): Copy EXPR_LOCATION.

gcc/testsuite/ChangeLog:

* g++.dg/cpp1y/constexpr-nsdmi7b.C: Adjust line.
* g++.dg/template/copy1.C: Likewise.
gcc/cp/tree.cc
gcc/testsuite/g++.dg/cpp1y/constexpr-nsdmi7b.C
gcc/testsuite/g++.dg/template/copy1.C