http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54003
Bug #: 54003 Summary: __atomic_always_lock_free inconsistent with __atomic_is_lock_free Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: h...@gcc.gnu.org CC: amacl...@redhat.com Created attachment 27817 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27817 Testcase suitable for gcc.dg/torture The attached code, suitable for gcc.dg/torture (or add -O2 to options if you want it to play in the same pool as the other atomic tests), exposes an inconsistency in the atomic support. The "constant" test says true while the "varying" test is allowed to say (and forced to say) false. I think this particular case is curable by the to-be-attached patch, but I haven't tested it and the comment needs tweaking, so just passing along as conceptual. :)