Bug 40275 - -combine should work for Fortran
Summary: -combine should work for Fortran
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-27 17:45 UTC by Joost VandeVondele
Modified: 2009-05-28 18:15 UTC (History)
1 user (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 Joost VandeVondele 2009-05-27 17:45:47 UTC
with -fwhole-file (and -fwhole-program) coming for Fortran, it would make sense to enable -combine for Fortran as well. This should be easy as Fortran -combine doesn't need any Fortran knowledge

gfortran -combine a.f90 b.f90 c.f90 

is literally equivalent to

cat a.f90 b.f90 c.f90 > tmp.f90
gfortran tmp.f90

things might be more complicated for .F90 (and similar) as the preprocessor needs to run before combining the files.
Comment 1 Andrew Pinski 2009-05-27 17:48:40 UTC
Really -combine is going away and LTO is replacing it.  It might be better to help out implementing LTO rather than wasting time on working on getting -combine working.
Comment 2 Joost VandeVondele 2009-05-27 17:54:34 UTC
(In reply to comment #1)
> Really -combine is going away and LTO is replacing it.  It might be better to
> help out implementing LTO rather than wasting time on working on getting
> -combine working.

unfortunately, I looks unlikely that LTO will support Fortran in the 4.5 time frame. Furthermore, I guess the will be differences in compile time efficiency between LTO and -combine (e.g. no need to read/write some intermediate data to disk).
Comment 3 Steven Bosscher 2009-05-28 18:15:59 UTC
This will never be implemented.