Bug 28385
Summary: | g++ -O hangs while compiling file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | David Baron <dbaron> | ||||
Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 7.0 | CC: | akkzilla, bbaetz, blizzard, dmose, dr, shaver | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2001-02-21 21:23:47 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
David Baron
2001-02-20 04:56:41 UTC
Created attachment 10440 [details]
nsStyleContext.ii - preprocessed source
Thanks. Actually, CVS head hangs on this as well. The culprit is: inline void CalcSidesFor(const nsIFrame* aFrame, const nsStyleSides& aSides, PRUint8 aSpacing, const nscoord* aEnumTable, PRInt32 aNumEnums, nsMargin& aResult) { nsStyleCoord coord; aResult.left = CalcSideFor(aFrame, aSides.GetLeft(coord), aSpacing, 3, aEnumTable, aNumEnums); aResult.top = CalcSideFor(aFrame, aSides.GetTop(coord), aSpacing, 0, aEnumTable, aNumEnums); aResult.right = CalcSideFor(aFrame, aSides.GetRight(coord), aSpacing, 1, aEnumTable, aNumEnums); aResult.bottom = CalcSideFor(aFrame, aSides.GetBottom(coord), aSpacing, 2, aEnumTable, aNumEnums); } and the tree based inlining for some reason does not limit itself in doing further and further inlines of itself in this case (because CalcSideFor indirectly calls CalcSidesFor). I'll try to simplify it first. With -O (not O3) and with gcc-2.96-54, it takes a long time, and finally gives up with: Cannot allocate 892625676 bytes after allocating 16260924 bytes I've narrowed it down to a 3K testcase and it really does not hang, it just does a lot of inlining and eats gobs of memory (if I remove one of the 4 routines for inlining, it actually succeeds on my 256MB box, otherwise I never had the patience to let it finish). I hope I'll know more tomorrow. Any movement on this? It's a real killer. Yes, I think I've fixed this by: http://gcc.gnu.org/ml/gcc-patches/2001-02/msg01310.html Mark Mitchell approved it, if Jason Merrill does not have anything against it until tomorrow, I'll commit it and will include it into gcc-c++-2.96-76. Are you committing the patch to both the gcc trunk and the gcc 3.0 branch? I sure hope this is fixed in gcc 3.0 also. Sure, I've commited it to both branch and head. |