From 05dddae1341a2d7ddcb0313983b8545fed03df9c Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Wed, 3 Oct 2007 09:46:46 +0000 Subject: [PATCH] re PR fortran/26682 (gfortran fails with -fwhole-program optimization) 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 | 6 ++++++ gcc/doc/invoke.texi | 1 + gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/options.c | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfa860ce24d..d08395db2eb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-10-03 Francois-Xavier Coudert + + PR fortran/26682 + * doc/invoke.texi (-fwhole-program): Document that Fortran + doesn't support this option. + 2007-10-02 Richard Sandiford PR middle-end/33617 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ed6a3b39633..349fbd78ad6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -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 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0d5c0cc7c1c..255a6270b7e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2007-10-03 Francois-Xavier Coudert + + PR fortran/26682 + * options.c (gfc_post_options): Issue an error when + -fwhole-program is used. + 2007-10-02 Paul Thomas PR fortran/33542 diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 5c3aefa4fe1..b2c17dca14e 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -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) { -- 2.11.4.GIT