[LLVMdev] LLVM-GCC & GV zeroinitializers, 2.5 vs 2.6.
Julien Lerouge
jlerouge at apple.com
Thu Sep 10 17:55:37 PDT 2009
Hello folks,
I have a small piece of C code written like this:
typedef struct {
char a;
int b;
int c;
} foo;
foo myFoo[5] = {{0}};
With llvm-gcc 2.5, I get the following IR:
%struct.foo = type { i8, i32, i32 }
@myFoo = global [5 x %struct.foo] zeroinitializer, align 32
With the current 2.6, I get this:
%0 = type { i8, [11 x i8] }
%struct.foo = type { i8, i32, i32 }
@myFoo = global [5 x %0] zeroinitializer, align 32
Is there any reason for the change ? It is weird that in the end, with
2.6 myFoo doesn't have the [5 x %struct.foo]* type.
Thanks,
Julien
--
Julien Lerouge
PGP Key Id: 0xB1964A62
PGP Fingerprint: 392D 4BAD DB8B CE7F 4E5F FA3C 62DB 4AA7 B196 4A62
PGP Public Key from: keyserver.pgp.com
More information about the llvm-dev
mailing list