The following is a failure with IMA on fairly basic stuff. Compile the files together as cc -O0 -c -o foo.o file1.c file2.c You get a multiply defined symbol in the .s file. This goes away with -O2 or higher. There should probably be an IMA component, I don't think this is the last problem we'll have with it (and Geoff insists it's not an optimization, so that's inappropriate). /* file 1 */ char *globals[] = {"a", "b"}; foo() { printf("%s\n", globals[0]); } /* file 2 */ extern char *globals[]; main() { printf("%s\n", globals[1]); }
Confirmed, also happens on 3.5.0.
I wish non unit-at-a-time mode will be removed.
Will be fixed when I get IMA working again.
I should say that it is working in my local compiler which has IMA semi working.
Fixed in 3.5.0.