OSDN Git Service

* doc/invoke.texi (-fwhole-file): Update docs.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 May 2009 13:43:32 +0000 (13:43 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 May 2009 13:43:32 +0000 (13:43 +0000)
* options.c (gfc_post_options): -fwhole-program imply -fwhole-file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147472 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/doc/invoke.texi
gcc/fortran/options.c

index 3d31637..de750e8 100644 (file)
@@ -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
 2009-05-12  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        * config/sh/sh.h (OVERRIDE_OPTIONS): Clear flag_schedule_insns
index d40361e..da5ea90 100644 (file)
@@ -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.
 
 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
 
 @item -fcprop-registers
 @opindex fcprop-registers
index b45696d..65841f6 100644 (file)
@@ -238,9 +238,9 @@ gfc_post_options (const char **pfilename)
     sorry ("-fexcess-precision=standard for Fortran");
   flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
 
     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)
   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)
 
   /* -fbounds-check is equivalent to -fcheck=bounds */
   if (flag_bounds_check)