aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.loader/TestLeak.java
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-10-24 20:36:32 -0400
committerJason Merrill <jason@redhat.com>2022-10-25 12:38:26 -0400
commite6a29aab51122103e677ffed523371c9c816ec98 (patch)
tree54f053da8bde4ffac115f19216fee5d14ce45573 /libjava/testsuite/libjava.loader/TestLeak.java
parentac8f92c18886057261d61d45b8d339629464c77e (diff)
downloadgcc-e6a29aab51122103e677ffed523371c9c816ec98.zip
gcc-e6a29aab51122103e677ffed523371c9c816ec98.tar.gz
gcc-e6a29aab51122103e677ffed523371c9c816ec98.tar.bz2
c++: constexpr-evaluate more assumes
The initial [[assume]] support avoided evaluating assumes with TREE_SIDE_EFFECTS set, such as calls, because we don't want any side-effects that change the constexpr state. This patch allows us to evaluate expressions with that flag set by tracking which variables the evaluation is allowed to modify, and giving up if it tries to touch any others. I considered allowing changes to other variables and then rolling them back, but that seems like a rare enough situation that it doesn't seem worth working to handle nicely at this point. gcc/cp/ChangeLog: * constexpr.cc (class constexpr_global_ctx): Add modifiable field, get_value, get_value_ptr, put_value, remove_value, flush_modifiable member functions. (class modifiable_tracker): New. (cxx_eval_internal_function): Use it. (diagnose_failing_condition): Strip CLEANUP_POINT_EXPR. gcc/testsuite/ChangeLog: * g++.dg/cpp23/attr-assume9.C: New test. * g++.dg/cpp23/attr-assume10.C: New test.
Diffstat (limited to 'libjava/testsuite/libjava.loader/TestLeak.java')
0 files changed, 0 insertions, 0 deletions