1537
|
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_C;
|
|
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 int unused2;
|
|
21 return S(q, 0);
|
|
22 }
|
|
23
|
|
24 const s = foo();
|
|
25 static assert(0xABCD_1234 == s.a);
|
|
26 static assert(0xC0FF_EEEE == s.b);
|