gcov broken on gcc 4.2.1 (Xcode 3.2.2) with inlines in precompiled headers
the coverage files produced when code coverage is enabled are bad when using gcc 4.2.1 with precompiled headers.
Steps to Reproduce:
1) download and extract attached project
2) go to the extracted folder in the Terminal
3) build it -> xcodebuild -configuration Debug
4) run it -> build/Debug/GCovTest
5) run gcov -> gcov -o build/GCovTest.build/Debug/GCovTest.build/Objects-normal/x86_64 test.m
6) Expect 83.33% of 6 for test.m.gcov
7) Change line 3 of GCovTest_Prefix.pch from #if 0 to #if 1
8) build it -> xcodebuild -configuration Debug
9) run it -> build/Debug/GCovTest
10) run gcov -> gcov -o build/GCovTest.build/Debug/GCovTest.build/Objects-normal/x86_64 test.m
83.33% of 6 for test.m.gcov
0.0% of 6 for test.m.gcov
Works fine with the GCC 4.0 compiler
(Attachment couldn't be added to openradar)
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!