aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2023-03-18 08:27:26 -0400
committerJason Merrill <jason@redhat.com>2023-03-21 11:08:59 -0400
commit041a164ec9b467f9ac2f15980f83f17e3f8ea150 (patch)
treea96f37374c4813489ea425c023d053fef86d081b /gcc/fortran
parent0963cb5fde158cce986523a90fa9edc51c881f31 (diff)
downloadgcc-041a164ec9b467f9ac2f15980f83f17e3f8ea150.zip
gcc-041a164ec9b467f9ac2f15980f83f17e3f8ea150.tar.gz
gcc-041a164ec9b467f9ac2f15980f83f17e3f8ea150.tar.bz2
c++: DMI in template with virtual base [PR106890]
When parsing a default member init we just build a CONVERT_EXPR for converting to a virtual base, and then expand that into the more complex form when we actually use the DMI in a constructor. But that wasn't working for the template case where we are considering the conversion at the point that the constructor needs the DMI instantiation, so it seemed like we were in a constructor already. And then when the other constructor tries to reuse the instantiation, it sees uses of the first constructor's parameters, and dies. So ensure that we get the CONVERT_EXPR in this case, too. PR c++/106890 gcc/cp/ChangeLog: * init.cc (maybe_instantiate_nsdmi_init): Don't leave current_function_decl set to a constructor. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/nsdmi-template25.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions