This is the mail archive of the
mailing list for the GCC project.
Re: [doc,patch] Document that -fwhole-program isn't supported for Fortran
- From: Tom Tromey <tromey at redhat dot com>
- To: FranÃois-Xavier Coudert <fxcoudert at gmail dot com>
- Cc: "fortran\ at gcc dot gnu dot org Fortran" <fortran at gcc dot gnu dot org>, "gcc-patches list" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 01 Oct 2007 11:46:21 -0600
- Subject: Re: [doc,patch] Document that -fwhole-program isn't supported for Fortran
- References: <firstname.lastname@example.org>
- Reply-to: tromey at redhat dot com
>>>>> "FX" == FranÃois-Xavier Coudert <email@example.com> writes:
FX> For Fortran, -fwhole-program isn't usable because the Fortran
FX> front-end issues more than one decl per function, thus making the call
FX> graph used in this optimisation wrong.
FWIW, the compile server ends up in this same situation. (This
happens because in the server we want to avoid decl smashing, so when
we see a declaration and then a definition we wind up with two decls.)
My current solution is to make a map that lists duplicates, then
canonicalize references during gimplification. To make this work in
the C FE, I had to move gimplification a bit later.