annotate run/const_06.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents ce33adb482a7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
153
ce33adb482a7 added const tests
thomask
parents:
diff changeset
1 // $HeadURL$
ce33adb482a7 added const tests
thomask
parents:
diff changeset
2 // $Date$
ce33adb482a7 added const tests
thomask
parents:
diff changeset
3 // $URL$
ce33adb482a7 added const tests
thomask
parents:
diff changeset
4
ce33adb482a7 added const tests
thomask
parents:
diff changeset
5 module dstress.run.const_06;
ce33adb482a7 added const tests
thomask
parents:
diff changeset
6
ce33adb482a7 added const tests
thomask
parents:
diff changeset
7 const int a = 1;
ce33adb482a7 added const tests
thomask
parents:
diff changeset
8 const int b = a + 1;
ce33adb482a7 added const tests
thomask
parents:
diff changeset
9 const int c = b + 1;
ce33adb482a7 added const tests
thomask
parents:
diff changeset
10
ce33adb482a7 added const tests
thomask
parents:
diff changeset
11 int main(){
ce33adb482a7 added const tests
thomask
parents:
diff changeset
12 assert(a==1);
ce33adb482a7 added const tests
thomask
parents:
diff changeset
13 assert(b==2);
ce33adb482a7 added const tests
thomask
parents:
diff changeset
14 assert(c==3);
ce33adb482a7 added const tests
thomask
parents:
diff changeset
15 return 0;
ce33adb482a7 added const tests
thomask
parents:
diff changeset
16 }