comparison compile/s/struct_30_D.d @ 1537:457db9394771

[Issue 1204] segfault using struct in CTFE Don Clugston <clugdbug@yahoo.com.au> 2007-04-30 http://d.puremagic.com/issues/show_bug.cgi?id=1204
author thomask
date Mon, 07 May 2007 05:21:26 +0000
parents
children
comparison
equal deleted inserted replaced
1536:89775df1607d 1537:457db9394771
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ Don Clugston <clugdbug@yahoo.com.au>
6 // @date@ 2007-04-30
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1204
8 // @desc@ [Issue 1204] segfault using struct in CTFE
9
10 module dstress.compile.s.struct_30_D;
11
12 struct S {
13 int a = 0xABCD_1234;
14 int b = 0xC0FF_EEEE;
15 }
16
17 S foo(){
18 int q = 0;
19 int unused;
20 return S(q, 0);
21 }
22
23 const s = foo();
24 static assert(0xABCD_1234 == s.a);
25 static assert(0xC0FF_EEEE == s.b);