Bug 42070 - FAIL: g++.dg/tree-prof/partition1.C compilation, -O3 -g -fprofile-use
Summary: FAIL: g++.dg/tree-prof/partition1.C compilation, -O3 -g -fprofile-use
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 20:00 UTC by Jack Howarth
Modified: 2010-10-06 19:50 UTC (History)
4 users (show)

See Also:
Host: *-apple-darwin10
Target: *-apple-darwin10
Build: *-apple-darwin10
Known to work:
Known to fail:
Last reconfirmed:


Attachments
patch to prune bogus linker warnings from Xcode 3.2.x. (380 bytes, patch)
2010-09-09 17:19 UTC, Jack Howarth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2009-11-16 20:00:04 UTC
Currently in gcc trunk on darwin10, we fail the test cases...

FAIL: g++.dg/tree-prof/partition1.C compilation,  -g  -fprofile-use
UNRESOLVED: g++.dg/tree-prof/partition1.C execution,    -g  -fprofile-use

FAIL: g++.dg/tree-prof/partition1.C compilation,  -O3 -g  -fprofile-use
UNRESOLVED: g++.dg/tree-prof/partition1.C execution,    -O3 -g  -fprofile-use

when compiling with -freorder-blocks-and-partition on darwin10 because of many warnings of the form...

ld: warning: can't add line info to anonymous symbol anon-func-0xF40 from /var/tmp//ccrw73YL.o

This was filed as radar 7289379 with the two failing test cases provided as samples of the problem. Apple's response was...

"In the sample you supplied, the warning is because there is code in the __TEXT/__unlikely section and there is dwarf debug information that says it part of a function.  The linker sanity checks how it broke up the .o file into "atoms"  by checking it against the dwarf debug info.  

I think the __unlikely section should be avoided on darwin until it is shown to work with the linker.  At a minimum each chunk in the __unlikely section should have a label on it with a name based on the function it came from.  Those labels would also help debugging.

This warning does not have anything to do removing labels from __eh_frame section."
Comment 1 Andrew Pinski 2009-11-16 20:02:04 UTC
Basically I think breaking up functions inside sections/segments in object files is a broken way of doing dead stripping.
Comment 2 Iain Sandoe 2010-04-06 20:53:36 UTC
(In reply to comment #1)
> Basically I think breaking up functions inside sections/segments in object
> files is a broken way of doing dead stripping.

hmm I think this is related to hot/cold partitioning rather than dead code stripping, per se.  
I wonder if it's partial fallout from not being able to use dwarf >2.
 ( I seem to recall that the problem area in dwarf2out was around the hot/cold sections).

Comment 3 Jack Howarth 2010-09-09 17:19:46 UTC
Created attachment 21755 [details]
patch to prune bogus linker warnings from Xcode 3.2.x.
Comment 4 Paolo Bonzini 2010-09-14 07:41:01 UTC
Subject: Bug 42070

Author: bonzini
Date: Tue Sep 14 07:40:44 2010
New Revision: 164269

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164269
Log:
2010-09-10  Jack Howarth <howarth@bromo.med.uc.edu>

	PR target/42070
	* gcc/testsuite/lib/profopt.exp: Prune warnings on execname2 compile.
	* gcc/testsuite/lib/prune.exp: Prune "can't add line info" warnings.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/profopt.exp
    trunk/gcc/testsuite/lib/prune.exp

Comment 5 mrs@gcc.gnu.org 2010-09-15 07:55:27 UTC
Fixed.
Comment 6 mrs@gcc.gnu.org 2010-10-06 19:22:40 UTC
Author: mrs
Date: Wed Oct  6 19:22:37 2010
New Revision: 165063

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165063
Log:
2010-10-06  Jack Howarth <howarth@bromo.med.uc.edu>

	Backport from mainline
	2010-09-10  Jack Howarth <howarth@bromo.med.uc.edu>

	PR target/42070
	* lib/profopt.exp: Prune warnings on execname2 compile.
	* lib/prune.exp: Prune "can't add line info" warnings.

Modified:
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_5-branch/gcc/testsuite/lib/profopt.exp
    branches/gcc-4_5-branch/gcc/testsuite/lib/prune.exp