Mercurial > projects > dstress
view run/b/bug_glue_387_A.d @ 1397:8cbb1b6de2a3
div. x86_64 fixes
author | thomask |
---|---|
date | Thu, 08 Mar 2007 16:24:10 +0000 |
parents | 9dcac8d4e97f |
children | b8c0195059d9 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2005-08-01 // @uri@ news:dclojd$6ak$1@digitaldaemon.com // @desc@ Assertion failure: '!v->csym' on line 387 in file 'glue.c' module dstress.run.b.bug_glue_387_A; version(D_InlineAsm_X86){ }else version(D_InlineAsm_X86_64){ }else{ pragma(msg, "DSTRESS{XFAIL}: no inline ASM support"); static assert(0); } enum msync{ acq, rel, } template atomicStore(T, msync ms){ void atomicStore(T val){ volatile asm{ mov EAX, val; } } } struct Atomic(T){ template store(msync ms){ void store(){ atomicStore!(T, ms)(m_val); } } T m_val; } template testStore(T, msync ms){ void testStore(){ T base; Atomic!(T) atom; if(atom.m_val != base){ assert(0); } atom.store!(ms)(); } } template testType(T){ void testType(){ testStore!(T, msync.acq)(); testStore!(T, msync.rel)(); } } int main(){ testType!(int)(); return 0; }