From: Francois-Xavier Coudert Date: Wed, 3 Oct 2007 09:46:46 +0000 (+0000) Subject: re PR fortran/26682 (gfortran fails with -fwhole-program optimization) X-Git-Tag: releases/gcc-4.3.0~2247 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05dddae1341a2d7ddcb0313983b8545fed03df9c;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bfa860ce24df..d08395db2ebb 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 ed6a3b396335..349fbd78ad68 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 0d5c0cc7c1c1..255a6270b7e6 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 5c3aefa4fe10..b2c17dca14e9 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) {