Bug 43481 - huge object files generated for un-initialized data
Summary: huge object files generated for un-initialized data
Status: RESOLVED DUPLICATE of bug 33120
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-22 16:16 UTC by IainS
Modified: 2010-03-22 18:57 UTC (History)
6 users (show)

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


Attachments
reduced testcase (94 bytes, text/plain)
2010-03-22 16:18 UTC, IainS
Details
provisional fix against 157594 (985 bytes, patch)
2010-03-22 16:21 UTC, IainS
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description IainS 2010-03-22 16:16:42 UTC
simple definitions of un-initialized data are using the .space asm directive which results in huge object files where fortran common variables are sizeable.

Although this is reported against fortran, it is possible that it also manifests for other components.

credit for reporting this to  Andy Nelson
Comment 1 IainS 2010-03-22 16:18:46 UTC
Created attachment 20160 [details]
reduced testcase

this compiles to an 7.6Mb object on current trunk.
Comment 2 IainS 2010-03-22 16:21:49 UTC
Created attachment 20161 [details]
provisional fix against 157594

this is plagiarized in its entirety from  apple/llvm 4.2 (was fixed in that tree in 2002 apparently).  
Credit for the fix should go to turley.

reg-tested on i686-apple-darwin9.
Comment 3 Janne Blomqvist 2010-03-22 16:51:51 UTC
Seems to be a target bug, nothing to do with the Fortran frontend. 

Also, unless "turley" has a copyright assignment on file with the FSF (didn't find him/her in the MAINTAINERS file), the patch unfortunately cannot be accepted.
Comment 4 IainS 2010-03-22 16:59:42 UTC
(In reply to comment #3)

> Also, unless "turley" has a copyright assignment on file with the FSF (didn't
> find him/her in the MAINTAINERS file), the patch unfortunately cannot be
> accepted.

It's from the apple / llvm tree which is already under FSF license - albeit V2. 
INAL - but I'm under the impression that there's no barrier to ports from that tree (other than time/effort/skill).


Comment 5 IainS 2010-03-22 18:55:02 UTC
(In reply to comment #3)

> Also, unless "turley" has a copyright assignment on file with the FSF (didn't
> find him/her in the MAINTAINERS file), the patch unfortunately cannot be
> accepted.

for the record also - my typo:

the fix author was Turly O'Connor (turly@apple.com) listed in the MAINTAINER's file for the tree revision from which the patch was taken  [although not listed in MAINTAINERs for trunk]


Comment 6 Andrew Pinski 2010-03-22 18:57:10 UTC

*** This bug has been marked as a duplicate of 33120 ***