aboutsummaryrefslogtreecommitdiff
path: root/libjava/javax/transaction/Transaction.h
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2025-03-25 13:36:24 -0400
committerMarek Polacek <polacek@redhat.com>2025-04-01 08:36:49 -0400
commite9803f10c9f376f6d091e7ef3ad6e1c92e7c8e8c (patch)
tree6d7806246e420b305b1ab1b0e3719a06e590f55c /libjava/javax/transaction/Transaction.h
parent182d891e13c78187f5e4f76512e03297fea0e56a (diff)
downloadgcc-e9803f10c9f376f6d091e7ef3ad6e1c92e7c8e8c.zip
gcc-e9803f10c9f376f6d091e7ef3ad6e1c92e7c8e8c.tar.gz
gcc-e9803f10c9f376f6d091e7ef3ad6e1c92e7c8e8c.tar.bz2
c++: fix missing lifetime extension [PR119383]
Since r15-8011 cp_build_indirect_ref_1 won't do the *&TARGET_EXPR -> TARGET_EXPR folding not to change its value category. That fix seems correct but it made us stop extending the lifetime in this testcase, causing a wrong-code issue -- extend_ref_init_temps_1 did not see through the extra *& because it doesn't use a tree walk. This patch reverts r15-8011 and instead handles the problem in build_over_call by calling force_lvalue in the is_really_empty_class case as well as in the general case. PR c++/119383 gcc/cp/ChangeLog: * call.cc (build_over_call): Use force_lvalue to ensure op= returns an lvalue. * cp-tree.h (force_lvalue): Declare. * cvt.cc (force_lvalue): New. * typeck.cc (cp_build_indirect_ref_1): Revert r15-8011. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/temp-extend3.C: New test. Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libjava/javax/transaction/Transaction.h')
0 files changed, 0 insertions, 0 deletions