Skip to content

Commit

Permalink
Add struct test for bug 13147 fix and inline assembly check.
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterWaldron committed May 5, 2016
1 parent 940e48c commit b5a5976
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion test/runnable/testinvariant.d
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,41 @@ void test13113()
/***************************************************/
// 13147

version (D_InlineAsm_X86)
enum x86iasm = true;
else version (D_InlineAsm_X86_64)
enum x86iasm = true;
else
enum x86iasm = false;

class C13147
{
extern (C++) C13147 test()
{
asm { naked; ret; }
static if (x86iasm)
asm { naked; ret; }
return this;
}
}

struct S13147
{
void test()
{
static if (x86iasm)
asm { naked; ret; }
}
}

void test13147()
{
auto c = new C13147();
c.test();
S13147 s;
s.test();
}


/***************************************************/

void main()
Expand Down

0 comments on commit b5a5976

Please sign in to comment.