http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59218

            Bug ID: 59218
           Summary: atomic transactions: accesses to volatiles not
                    disallowed in transaction_safe code
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: torvald at gcc dot gnu.org
                CC: aldyh at gcc dot gnu.org

Accesses to volatiles are disallowed in transaction-safe code.  The following
should produce an error, but doesn't:

volatile int volatile *b;

void foo()
{
  __transaction_atomic
    {
      b[10] = b[10] + 1;
    }
}

If accessing a "volatile int a" instead, an error is reported (as expected).

Reply via email to