Bug 28877 - gcc file1.c file2.c file3.c -o file.o fails
Summary: gcc file1.c file2.c file3.c -o file.o fails
Status: VERIFIED DUPLICATE of bug 22544
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.0.1
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-28 22:28 UTC by Ian Ollmann
Modified: 2006-08-28 23:13 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Ollmann 2006-08-28 22:28:50 UTC
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?
Comment 1 Andrew Pinski 2006-08-28 22:49:21 UTC
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 ***
Comment 2 Andrew Pinski 2006-08-28 22:50:39 UTC
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).
Comment 3 Ian Ollmann 2006-08-28 23:13:12 UTC
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.