summaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-04 22:38:48 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-04 22:38:48 +0000
commitf36f9b8b60e597a963f2cc2f20c712f17f8071a2 (patch)
treefc831ba012d14081b0a59fc329cfc207bc7d16aa /gcc/fortran
parent09484478003c1db92bdb699e50cb4bb3826115ca (diff)
downloadgcc-f36f9b8b60e597a963f2cc2f20c712f17f8071a2.tar.gz
include/
* dwarf2.h (enum dwarf_source_language): Add DW_LANG_Fortran03 and DW_LANG_Fortran08. gcc/ * dwarf2out.c (is_fortran): Also return true for DW_LANG_Fortran03 or DW_LANG_Fortran08. (lower_bound_default): Return 1 for DW_LANG_Fortran03 or DW_LANG_Fortran08. (gen_compile_unit_die): Handle "GNU Fortran2003" and "GNU Fortran2008" language strings. * dbxout.c (get_lang_number): Use lang_GNU_Fortran. * langhooks.h (lang_GNU_Fortran): New prototype. * langhooks.c (lang_GNU_Fortran): New function. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Use lang_GNU_Fortran. gcc/fortran/ * options.c: Include langhooks.h. (gfc_post_options): Change lang_hooks.name based on selected -std= mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/options.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 8b4e6877c02..35504e3dd0b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2015-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ * options.c: Include langhooks.h.
+ (gfc_post_options): Change lang_hooks.name based on
+ selected -std= mode.
+
2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
* intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 60473dd2376..1262ccc19aa 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "cpp.h"
#include "diagnostic.h" /* For global_dc. */
#include "tm.h"
+#include "langhooks.h"
gfc_option_t gfc_option;
@@ -398,6 +399,11 @@ gfc_post_options (const char **pfilename)
gfc_cpp_post_options ();
+ if (gfc_option.allow_std & GFC_STD_F2008)
+ lang_hooks.name = "GNU Fortran2008";
+ else if (gfc_option.allow_std & GFC_STD_F2003)
+ lang_hooks.name = "GNU Fortran2003";
+
return gfc_cpp_preprocess_only ();
}