[Bug middle-end/70638] New: transaction_wrap: too strict compatibility check and transaction_pure wrappers fail to wrap
torvald at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 12 14:12:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70638
Bug ID: 70638
Summary: transaction_wrap: too strict compatibility check and
transaction_pure wrappers fail to wrap
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: torvald at gcc dot gnu.org
Target Milestone: ---
The attached test case shows two issues with transaction_wrap:
1) If the original function is not transaction_safe, but the wrapper is
declared safe, this incorrectly results in an compilation error about the
original and the wrapper function being incompatible.
I believe this used to work before, but haven't checked.
2) If a wrapper is declared transaction_pure, the original function is
incorrectly considered to be transaction_pure.
The fourth case in the test might be something to be considered adding support
for. OTOH, perhaps it's safer for programmers having to explicitly select
whether a wrapper is pure or safe, given that there seem to be these two
separate use cases (ie, making it pure to customize instrumentation, and making
it safe to use a transaction-friendly wrapper that still needs to be
instrumented).
More information about the Gcc-bugs
mailing list