This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libitm/68591] New: trans-mem: missing transactional read in transaction when using -O1
- From: "torvald at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Nov 2015 22:44:04 +0000
- Subject: [Bug libitm/68591] New: trans-mem: missing transactional read in transaction when using -O1
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68591
Bug ID: 68591
Summary: trans-mem: missing transactional read in transaction
when using -O1
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libitm
Assignee: unassigned at gcc dot gnu.org
Reporter: torvald at gcc dot gnu.org
Target Milestone: ---
Created attachment 36860
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36860&action=edit
test case
The attached test case miscompiles in that it does not transform the load from
ptr in the conditional in the transaction into a transactional load. Instead,
it seems to assume that ptr's value is fixed and not shared with other threads.
This changes when the synchronization that could potentially make it share
gets inlined into the function with the transaction. For simplicity, this is a
single-threaded test, but I discovered that in a multi-threaded setting.