aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-05-13 15:43:32 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-05-13 13:43:32 +0000
commitebaa6ea7adb2e6107bdd06d4c8f89c8f614550bc (patch)
tree65166a94a1c7ea4b4623154d67f6054bfa00f1c3 /gcc
parentd68646978cd863a43018fd3215d857d7da03f545 (diff)
downloadgcc-ebaa6ea7adb2e6107bdd06d4c8f89c8f614550bc.zip
gcc-ebaa6ea7adb2e6107bdd06d4c8f89c8f614550bc.tar.gz
gcc-ebaa6ea7adb2e6107bdd06d4c8f89c8f614550bc.tar.bz2
invoke.texi (-fwhole-file): Update docs.
* doc/invoke.texi (-fwhole-file): Update docs. * options.c (gfc_post_options): -fwhole-program imply -fwhole-file. From-SVN: r147472
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/doc/invoke.texi2
-rw-r--r--gcc/fortran/options.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3d31637..de750e8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-13 Jan Hubicka <jh@suse.cz>
+
+ * options.c (gfc_post_options): -fwhole-program imply -fwhole-file.
+
2009-05-12 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.h (OVERRIDE_OPTIONS): Clear flag_schedule_insns
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d40361e..da5ea90 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6803,7 +6803,7 @@ programs consisting of a single file, in combination with option
programs since the functions and variables become local for the whole combined
compilation unit, not for the single source file itself.
-This option is not supported for Fortran programs.
+This option implies @option{-fwhole-file} for Fortran programs.
@item -fcprop-registers
@opindex fcprop-registers
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index b45696d..65841f6 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -238,9 +238,9 @@ gfc_post_options (const char **pfilename)
sorry ("-fexcess-precision=standard for Fortran");
flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
- /* Issue an error if -fwhole-program was used. */
+ /* Whole program needs whole file mode. */
if (flag_whole_program)
- gfc_fatal_error ("Option -fwhole-program is not supported for Fortran");
+ gfc_option.flag_whole_file = 1;
/* -fbounds-check is equivalent to -fcheck=bounds */
if (flag_bounds_check)