mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-30 23:35:00 +08:00
dwarf2.h (enum dwarf_source_language): Add DW_LANG_Fortran03 and DW_LANG_Fortran08.
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. From-SVN: r220422
This commit is contained in:
parent
a6bc87d334
commit
de3aebffe9
@ -1,3 +1,17 @@
|
|||||||
|
2015-02-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2015-02-04 Eric Botcazou <ebotcazou@adacore.com>
|
2015-02-04 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* config/sparc/sparc.c (RTX_OK_FOR_OFFSET_P): Fix off-by-one error.
|
* config/sparc/sparc.c (RTX_OK_FOR_OFFSET_P): Fix off-by-one error.
|
||||||
|
@ -25537,7 +25537,7 @@ rs6000_output_function_epilogue (FILE *file,
|
|||||||
|| ! strcmp (language_string, "libgccjit"))
|
|| ! strcmp (language_string, "libgccjit"))
|
||||||
i = 0;
|
i = 0;
|
||||||
else if (! strcmp (language_string, "GNU F77")
|
else if (! strcmp (language_string, "GNU F77")
|
||||||
|| ! strcmp (language_string, "GNU Fortran"))
|
|| lang_GNU_Fortran ())
|
||||||
i = 1;
|
i = 1;
|
||||||
else if (! strcmp (language_string, "GNU Pascal"))
|
else if (! strcmp (language_string, "GNU Pascal"))
|
||||||
i = 2;
|
i = 2;
|
||||||
|
@ -967,7 +967,7 @@ get_lang_number (void)
|
|||||||
return N_SO_CC;
|
return N_SO_CC;
|
||||||
else if (strcmp (language_string, "GNU F77") == 0)
|
else if (strcmp (language_string, "GNU F77") == 0)
|
||||||
return N_SO_FORTRAN;
|
return N_SO_FORTRAN;
|
||||||
else if (strcmp (language_string, "GNU Fortran") == 0)
|
else if (lang_GNU_Fortran ())
|
||||||
return N_SO_FORTRAN90; /* CHECKME */
|
return N_SO_FORTRAN90; /* CHECKME */
|
||||||
else if (strcmp (language_string, "GNU Pascal") == 0)
|
else if (strcmp (language_string, "GNU Pascal") == 0)
|
||||||
return N_SO_PASCAL;
|
return N_SO_PASCAL;
|
||||||
|
@ -4736,7 +4736,9 @@ is_fortran (void)
|
|||||||
|
|
||||||
return (lang == DW_LANG_Fortran77
|
return (lang == DW_LANG_Fortran77
|
||||||
|| lang == DW_LANG_Fortran90
|
|| lang == DW_LANG_Fortran90
|
||||||
|| lang == DW_LANG_Fortran95);
|
|| lang == DW_LANG_Fortran95
|
||||||
|
|| lang == DW_LANG_Fortran03
|
||||||
|
|| lang == DW_LANG_Fortran08);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if the language is Ada. */
|
/* Return TRUE if the language is Ada. */
|
||||||
@ -16725,6 +16727,8 @@ lower_bound_default (void)
|
|||||||
case DW_LANG_Fortran77:
|
case DW_LANG_Fortran77:
|
||||||
case DW_LANG_Fortran90:
|
case DW_LANG_Fortran90:
|
||||||
case DW_LANG_Fortran95:
|
case DW_LANG_Fortran95:
|
||||||
|
case DW_LANG_Fortran03:
|
||||||
|
case DW_LANG_Fortran08:
|
||||||
return 1;
|
return 1;
|
||||||
case DW_LANG_UPC:
|
case DW_LANG_UPC:
|
||||||
case DW_LANG_D:
|
case DW_LANG_D:
|
||||||
@ -19786,8 +19790,17 @@ gen_compile_unit_die (const char *filename)
|
|||||||
{
|
{
|
||||||
if (strcmp (language_string, "GNU Ada") == 0)
|
if (strcmp (language_string, "GNU Ada") == 0)
|
||||||
language = DW_LANG_Ada95;
|
language = DW_LANG_Ada95;
|
||||||
else if (strcmp (language_string, "GNU Fortran") == 0)
|
else if (strncmp (language_string, "GNU Fortran", 11) == 0)
|
||||||
|
{
|
||||||
language = DW_LANG_Fortran95;
|
language = DW_LANG_Fortran95;
|
||||||
|
if (dwarf_version >= 5 /* || !dwarf_strict */)
|
||||||
|
{
|
||||||
|
if (strcmp (language_string, "GNU Fortran2003") == 0)
|
||||||
|
language = DW_LANG_Fortran03;
|
||||||
|
else if (strcmp (language_string, "GNU Fortran2008") == 0)
|
||||||
|
language = DW_LANG_Fortran08;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (strcmp (language_string, "GNU Java") == 0)
|
else if (strcmp (language_string, "GNU Java") == 0)
|
||||||
language = DW_LANG_Java;
|
language = DW_LANG_Java;
|
||||||
else if (strcmp (language_string, "GNU Objective-C") == 0)
|
else if (strcmp (language_string, "GNU Objective-C") == 0)
|
||||||
@ -19801,7 +19814,7 @@ gen_compile_unit_die (const char *filename)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Use a degraded Fortran setting in strict DWARF2 so is_fortran works. */
|
/* Use a degraded Fortran setting in strict DWARF2 so is_fortran works. */
|
||||||
else if (strcmp (language_string, "GNU Fortran") == 0)
|
else if (strncmp (language_string, "GNU Fortran", 11) == 0)
|
||||||
language = DW_LANG_Fortran90;
|
language = DW_LANG_Fortran90;
|
||||||
|
|
||||||
add_AT_unsigned (die, DW_AT_language, language);
|
add_AT_unsigned (die, DW_AT_language, language);
|
||||||
@ -19811,6 +19824,8 @@ gen_compile_unit_die (const char *filename)
|
|||||||
case DW_LANG_Fortran77:
|
case DW_LANG_Fortran77:
|
||||||
case DW_LANG_Fortran90:
|
case DW_LANG_Fortran90:
|
||||||
case DW_LANG_Fortran95:
|
case DW_LANG_Fortran95:
|
||||||
|
case DW_LANG_Fortran03:
|
||||||
|
case DW_LANG_Fortran08:
|
||||||
/* Fortran has case insensitive identifiers and the front-end
|
/* Fortran has case insensitive identifiers and the front-end
|
||||||
lowercases everything. */
|
lowercases everything. */
|
||||||
add_AT_unsigned (die, DW_AT_identifier_case, DW_ID_down_case);
|
add_AT_unsigned (die, DW_AT_identifier_case, DW_ID_down_case);
|
||||||
|
@ -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>
|
2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
* intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
|
* intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
|
||||||
|
@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
|
|||||||
#include "cpp.h"
|
#include "cpp.h"
|
||||||
#include "diagnostic.h" /* For global_dc. */
|
#include "diagnostic.h" /* For global_dc. */
|
||||||
#include "tm.h"
|
#include "tm.h"
|
||||||
|
#include "langhooks.h"
|
||||||
|
|
||||||
gfc_option_t gfc_option;
|
gfc_option_t gfc_option;
|
||||||
|
|
||||||
@ -398,6 +399,11 @@ gfc_post_options (const char **pfilename)
|
|||||||
|
|
||||||
gfc_cpp_post_options ();
|
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 ();
|
return gfc_cpp_preprocess_only ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,3 +731,11 @@ lang_GNU_CXX (void)
|
|||||||
{
|
{
|
||||||
return strncmp (lang_hooks.name, "GNU C++", 7) == 0;
|
return strncmp (lang_hooks.name, "GNU C++", 7) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Returns true if the current lang_hooks represents the GNU Fortran frontend. */
|
||||||
|
|
||||||
|
bool
|
||||||
|
lang_GNU_Fortran (void)
|
||||||
|
{
|
||||||
|
return strncmp (lang_hooks.name, "GNU Fortran", 11) == 0;
|
||||||
|
}
|
||||||
|
@ -509,5 +509,6 @@ extern tree add_builtin_type (const char *name, tree type);
|
|||||||
|
|
||||||
extern bool lang_GNU_C (void);
|
extern bool lang_GNU_C (void);
|
||||||
extern bool lang_GNU_CXX (void);
|
extern bool lang_GNU_CXX (void);
|
||||||
|
extern bool lang_GNU_Fortran (void);
|
||||||
|
|
||||||
#endif /* GCC_LANG_HOOKS_H */
|
#endif /* GCC_LANG_HOOKS_H */
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2015-02-04 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* dwarf2.h (enum dwarf_source_language): Add DW_LANG_Fortran03
|
||||||
|
and DW_LANG_Fortran08.
|
||||||
|
|
||||||
2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
|
2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
Julian Brown <julian@codesourcery.com>
|
Julian Brown <julian@codesourcery.com>
|
||||||
James Norris <jnorris@codesourcery.com>
|
James Norris <jnorris@codesourcery.com>
|
||||||
|
@ -312,6 +312,8 @@ enum dwarf_source_language
|
|||||||
DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
|
DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */
|
||||||
DW_LANG_C11 = 0x001d,
|
DW_LANG_C11 = 0x001d,
|
||||||
DW_LANG_C_plus_plus_14 = 0x0021,
|
DW_LANG_C_plus_plus_14 = 0x0021,
|
||||||
|
DW_LANG_Fortran03 = 0x0022,
|
||||||
|
DW_LANG_Fortran08 = 0x0023,
|
||||||
|
|
||||||
DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */
|
DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */
|
||||||
DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */
|
DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */
|
||||||
|
Loading…
Reference in New Issue
Block a user