LDC 0.11.0 has been released!

bearophile bearophileHUGS at lycos.com
Tue Aug 6 01:48:26 PDT 2013


If I compile this little program:

void main() {
     align(4) double[1600] a;
     align(8) double[1600] b;
     align(16) double[1600] c;
}


With:

ldmd2 -output-ll test.d


I see no warnings nor errors, and the main is:


define i32 @_Dmain({ i32, { i32, i8* }* } %unnamed) {
entry:
   %a = alloca [1600 x double], align 8
   %arrayinit.itr = alloca i32, align 4
   %b = alloca [1600 x double], align 8
   %arrayinit.itr8 = alloca i32, align 4
   %c = alloca [1600 x double], align 8
   %arrayinit.itr19 = alloca i32, align 4
   %tmp = getelementptr [1600 x double]* %a, i32 0, i32 0
   store i32 0, i32* %arrayinit.itr
   br label %arrayinit.cond


So it silently ignores the align(). Is this a bug?

Bye,
bearophile


More information about the digitalmars-d-ldc mailing list