diff options
author | Jason Merrill <jason@redhat.com> | 2022-12-20 16:27:43 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2023-01-22 19:36:14 -0500 |
commit | 208c6678c25bd9a11e6c5911a4c123cb6b7f3d6e (patch) | |
tree | 283ef541f7281b197a69c118355fde75b9468e7c /gcc/fortran | |
parent | 7823285a7ae8c516d2dfa96d426692bf2aef571e (diff) | |
download | gcc-208c6678c25bd9a11e6c5911a4c123cb6b7f3d6e.zip gcc-208c6678c25bd9a11e6c5911a4c123cb6b7f3d6e.tar.gz gcc-208c6678c25bd9a11e6c5911a4c123cb6b7f3d6e.tar.bz2 |
c++: lifetime extension with .* expression [PR53288]
This PR points out a case where we are not extending the lifetime of a
temporary when the subobject is denoted by a pointer-to-member operation.
These rules were clarified in C++20 by CWG1299.
There are other cases that also need to be handled under CWG1299, but are
not fixed by this patch.
PR c++/53288
DR 1299
gcc/cp/ChangeLog:
* call.cc (extend_ref_init_temps_1): Handle ptrmem expression.
gcc/testsuite/ChangeLog:
* g++.dg/init/lifetime4.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions