Rune - Fix array passing, optimize constant array indices
[rune.git] / tests / build2.d
1 #!/usr/local/bin/rune -x
2 #
3 # Used to help test the code generator output
4
5 import "sys";
6
7 int A;
8 int B;
9 int C = 4;
10 int D;
11 int X;
12 ldouble E;
13
14 int
15 main(int ac, char **av)
16 {
17         int a;
18         int b;
19         global int cccc = 4;
20         # this crashes - should fail with an error ('a' is not accessible
21         # to initializers for the global space)
22         #global int dddd = cccc + a;
23         global int eeee = cccc;
24         int d;
25         ldouble x;
26
27         # dddd = 5;
28         eeee = 5;
29
30         if (x < 0.0X)
31                 x = -x;
32
33         return 0;
34 }