This doesn't work on my apple gcc. If you inspect with -v, it compiles each file in turn and writes to file.o, each file overwriting the one before it, rather than combining the three .c files into one .o. I can think of some pretty good reasons to do this, including cross compilation-unit inlining. Is/should this be a supported feature?
This was a bug in 4.0.0-4.0.2, it was fixed for 4.0.3 by me never the less. To get IMA, you need -combine. *** This bug has been marked as a duplicate of 22544 ***
PS please report Apple GCC bugs to Apple first and if you want to report a GCC bug to the FSF, please test on the branch (and/or the latest release).
Thanks for fixing it Andrew. I can confirm that -combine works. Hopefully Apple will get around to updating to 4.0.3 one of these days. ...and really, you should be thrilled to get duplicate bug reports! They are sooo much easier to fix.