https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90065

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
I have my suspicions that the following code will throw an unaligned access
error as well.

    shared int var;
    void main() {
      synchronized { var = 1; }
    }


As synchronized statements are lowered to the following equivalent C.

    static char __critsec64[48];
    _d_criticalenter(& __critsec64);
    var = 0;
    _d_criticalexit(& __critsec64);


Just going off memory, but I don't think the artificial __critsec variable
would be suitably aligned for use as a pthread_mutex_t.

Reply via email to