]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/26682 (gfortran fails with -fwhole-program optimization)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 3 Oct 2007 09:46:46 +0000 (09:46 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 3 Oct 2007 09:46:46 +0000 (09:46 +0000)
PR fortran/26682

* options.c (gfc_post_options): Issue an error when
-fwhole-program is used.

* doc/invoke.texi (-fwhole-program): Document that Fortran
doesn't support this option.

From-SVN: r128977

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

index bfa860ce24dfc703fcd8bd80a2186ef3c1808d8a..d08395db2ebb8045ecc26248dbe03301aa01323b 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/26682
+       * doc/invoke.texi (-fwhole-program): Document that Fortran
+       doesn't support this option.
+
 2007-10-02  Richard Sandiford  <rsandifo@nildram.co.uk>
 
        PR middle-end/33617
index ed6a3b3963356bf44fecfe37886d6d4323ab16ec..349fbd78ad68f1e7d3a73f208f5903e5273106af 100644 (file)
@@ -6147,6 +6147,7 @@ programs consisting of 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.
 
 @item -fno-cprop-registers
 @opindex fno-cprop-registers
index 0d5c0cc7c1c1842968aa665a72f4e53632f7381f..255a6270b7e676a1994d418afafaaa7b6d4c6b12 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       PR fortran/26682
+       * options.c (gfc_post_options): Issue an error when
+       -fwhole-program is used.
+
 2007-10-02  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/33542
index 5c3aefa4fe10ab4ad2b5a487e58a45bcfeb9156b..b2c17dca14e95d7a1468ab6c634a0c66e0d8e2c9 100644 (file)
@@ -211,6 +211,10 @@ gfc_post_options (const char **pfilename)
   char *source_path;
   int i;
 
+  /* Issue an error if -fwhole-program was used.  */
+  if (flag_whole_program)
+    gfc_fatal_error ("Option -fwhole-program is not supported for Fortran");
+
   /* Verify the input file name.  */
   if (!filename || strcmp (filename, "-") == 0)
     {