diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-31 01:24:29 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-31 01:24:29 +0000 |
commit | d6583a5ff1599ea0f0808355f6ab375b5877f5d0 (patch) | |
tree | b5b041323c25b727232c8af83c61b4df9b68a294 /gcc | |
parent | 5f2c86bc0e7ac2ecb2f0e392e0ceead61a4ac8f0 (diff) | |
download | ppe42-gcc-d6583a5ff1599ea0f0808355f6ab375b5877f5d0.tar.gz ppe42-gcc-d6583a5ff1599ea0f0808355f6ab375b5877f5d0.zip |
2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
PR fortran/17590
* gfortran.h: Change GFC_STD_* flags to more appropriate
ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
gfc_option_t): Add field for warning about use of nonstandard
intrinsics.
* intrinsic.c (add_sym): Add parameter for standard version, check
this against current standard.
(add_sym_0): Pass standard parameter to add_sym.
(add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
(add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
(add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
(make_generic): Add parameter for standard, check this
against currently selected standard.
(add_functions, add_subroutines): Add parameter to tell which
standard an intrinsic belongs to.
(check_intrinsic_standard): New function.
(gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
(gfc_intrinsic_sub_interface): Ditto.
* lang.opt: Add Wnonstd-intrinsics option.
* options.c (gfc_init_options): Change to use new GFC_STD_* flags,
init new warning.
(set_Wall): Add warning about nonstd intrinsics.
(gfc_handle_option): Change to use new GFC_STD_* flags,
handle new warning.
* invoke.texi: Update manual to include -Wnonstd-intrinsics.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89907 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 28 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 16 | ||||
-rw-r--r-- | gcc/fortran/intrinsic.c | 798 | ||||
-rw-r--r-- | gcc/fortran/invoke.texi | 14 | ||||
-rw-r--r-- | gcc/fortran/lang.opt | 4 | ||||
-rw-r--r-- | gcc/fortran/options.c | 24 |
6 files changed, 492 insertions, 392 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2854d744485..a0590809595 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,31 @@ +2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi> + + PR fortran/17590 + * gfortran.h: Change GFC_STD_* flags to more appropriate + ones. (struct gfc_intrinsic_isym): Add field for standard. (struct + gfc_option_t): Add field for warning about use of nonstandard + intrinsics. + * intrinsic.c (add_sym): Add parameter for standard version, check + this against current standard. + (add_sym_0): Pass standard parameter to add_sym. + (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto. + (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto. + (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto. + (make_generic): Add parameter for standard, check this + against currently selected standard. + (add_functions, add_subroutines): Add parameter to tell which + standard an intrinsic belongs to. + (check_intrinsic_standard): New function. + (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard. + (gfc_intrinsic_sub_interface): Ditto. + * lang.opt: Add Wnonstd-intrinsics option. + * options.c (gfc_init_options): Change to use new GFC_STD_* flags, + init new warning. + (set_Wall): Add warning about nonstd intrinsics. + (gfc_handle_option): Change to use new GFC_STD_* flags, + handle new warning. + * invoke.texi: Update manual to include -Wnonstd-intrinsics. + 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu> * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN. diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 85485612d0f..5020a1f930d 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -97,12 +97,13 @@ mstring; /* Flags to specify which standardi/extension contains a feature. */ -#define GFC_STD_GNU (1<<5) /* GNU Fortran extension. */ -#define GFC_STD_F2003 (1<<4) /* New in F2003. */ -#define GFC_STD_F2003_DEL (1<<3) /* Deleted in F2003. */ -#define GFC_STD_F2003_OBS (1<<2) /* Obsoleted in F2003. */ -#define GFC_STD_F95_DEL (1<<1) /* Deleted in F95. */ -#define GFC_STD_F95_OBS (1<<0) /* Obsoleted in F95. */ +#define GFC_STD_GNU (1<<5) /* GNU Fortran extension. */ +#define GFC_STD_F2003 (1<<4) /* New in F2003. */ +/* Note that no features were obsoleted nor deleted in F2003. */ +#define GFC_STD_F95 (1<<3) /* New in F95. */ +#define GFC_STD_F95_DEL (1<<2) /* Deleted in F95. */ +#define GFC_STD_F95_OBS (1<<1) /* Obsoleted in F95. */ +#define GFC_STD_F77 (1<<0) /* Up to and including F77. */ /*************************** Enums *****************************/ @@ -1004,7 +1005,7 @@ typedef struct gfc_intrinsic_sym char name[GFC_MAX_SYMBOL_LEN + 1], lib_name[GFC_MAX_SYMBOL_LEN + 1]; gfc_intrinsic_arg *formal; gfc_typespec ts; - int elemental, pure, generic, specific, actual_ok; + int elemental, pure, generic, specific, actual_ok, standard; gfc_simplify_f simplify; gfc_check_f check; @@ -1403,6 +1404,7 @@ typedef struct int d8; int warn_std; int allow_std; + int warn_nonstd_intrinsics; } gfc_option_t; diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index bc69f54cb2c..1c1698fdd2e 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -196,6 +196,7 @@ do_check (gfc_intrinsic_sym * specific, gfc_actual_arglist * arg) int If the function can be used as an actual argument bt return type of function int kind of return type of function + int Fortran standard version check pointer to check function simplify pointer to simplification function resolve pointer to resolution function @@ -213,13 +214,18 @@ do_check (gfc_intrinsic_sym * specific, gfc_actual_arglist * arg) static void add_sym (const char *name, int elemental, int actual_ok ATTRIBUTE_UNUSED, - bt type, int kind, gfc_check_f check, gfc_simplify_f simplify, - gfc_resolve_f resolve, ...) + bt type, int kind, int standard, gfc_check_f check, + gfc_simplify_f simplify, gfc_resolve_f resolve, ...) { int optional, first_flag; va_list argp; + /* First check that the intrinsic belongs to the selected standard. + If not, don't add it to the symbol list. */ + if (!(gfc_option.allow_std & standard)) + return; + switch (sizing) { case SZ_SUBS: @@ -239,6 +245,7 @@ add_sym (const char *name, int elemental, int actual_ok ATTRIBUTE_UNUSED, next_sym->elemental = elemental; next_sym->ts.type = type; next_sym->ts.kind = kind; + next_sym->standard = standard; next_sym->simplify = simplify; next_sym->check = check; next_sym->resolve = resolve; @@ -291,7 +298,7 @@ add_sym (const char *name, int elemental, int actual_ok ATTRIBUTE_UNUSED, static void add_sym_0 (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(void), gfc_expr *(*simplify)(void), void (*resolve)(gfc_expr *) @@ -304,13 +311,13 @@ static void add_sym_0 (const char *name, int elemental, int actual_ok, bt type, sf.f0 = simplify; rf.f0 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, (void*)0); } static void add_sym_1 (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *), gfc_expr *(*simplify)(gfc_expr *), void (*resolve)(gfc_expr *,gfc_expr *), @@ -324,14 +331,14 @@ static void add_sym_1 (const char *name, int elemental, int actual_ok, bt type, sf.f1 = simplify; rf.f1 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, (void*)0); } static void -add_sym_0s (const char * name, int actual_ok, +add_sym_0s (const char * name, int actual_ok, int standard, void (*resolve)(gfc_code *)) { gfc_check_f cf; @@ -342,13 +349,13 @@ add_sym_0s (const char * name, int actual_ok, sf.f1 = NULL; rf.s1 = resolve; - add_sym (name, 1, actual_ok, BT_UNKNOWN, 0, cf, sf, rf, + add_sym (name, 1, actual_ok, BT_UNKNOWN, 0, standard, cf, sf, rf, (void*)0); } static void add_sym_1s (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *), gfc_expr *(*simplify)(gfc_expr *), void (*resolve)(gfc_code *), @@ -362,14 +369,14 @@ static void add_sym_1s (const char *name, int elemental, int actual_ok, bt type, sf.f1 = simplify; rf.s1 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, (void*)0); } static void add_sym_1m (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_actual_arglist *), gfc_expr *(*simplify)(gfc_expr *), void (*resolve)(gfc_expr *,gfc_actual_arglist *), @@ -384,7 +391,7 @@ static void add_sym_1m (const char *name, int elemental, int actual_ok, bt type, sf.f1 = simplify; rf.f1m = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, (void*)0); @@ -392,7 +399,7 @@ static void add_sym_1m (const char *name, int elemental, int actual_ok, bt type, static void add_sym_2 (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *), void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *), @@ -407,7 +414,7 @@ static void add_sym_2 (const char *name, int elemental, int actual_ok, bt type, sf.f2 = simplify; rf.f2 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, (void*)0); @@ -418,7 +425,7 @@ static void add_sym_2 (const char *name, int elemental, int actual_ok, bt type, of intrinsic names. */ static void add_sym_2s (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *), void (*resolve)(gfc_code *), @@ -433,7 +440,7 @@ static void add_sym_2s (const char *name, int elemental, int actual_ok, bt type, sf.f2 = simplify; rf.s1 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, (void*)0); @@ -441,7 +448,7 @@ static void add_sym_2s (const char *name, int elemental, int actual_ok, bt type, static void add_sym_3 (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *,gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), @@ -457,7 +464,7 @@ static void add_sym_3 (const char *name, int elemental, int actual_ok, bt type, sf.f3 = simplify; rf.f3 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -468,7 +475,7 @@ static void add_sym_3 (const char *name, int elemental, int actual_ok, bt type, might have to be reordered. */ static void add_sym_3ml (const char *name, int elemental, - int actual_ok, bt type, int kind, + int actual_ok, bt type, int kind, int standard, try (*check)(gfc_actual_arglist *), gfc_expr*(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), @@ -484,7 +491,7 @@ static void add_sym_3ml (const char *name, int elemental, sf.f3 = simplify; rf.f3 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -495,7 +502,7 @@ static void add_sym_3ml (const char *name, int elemental, their argument also might have to be reordered. */ static void add_sym_3red (const char *name, int elemental, - int actual_ok, bt type, int kind, + int actual_ok, bt type, int kind, int standard, try (*check)(gfc_actual_arglist *), gfc_expr*(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), @@ -511,7 +518,7 @@ static void add_sym_3red (const char *name, int elemental, sf.f3 = simplify; rf.f3 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -522,7 +529,7 @@ static void add_sym_3red (const char *name, int elemental, of intrinsic names. */ static void add_sym_3s (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *,gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_code *), @@ -538,7 +545,7 @@ static void add_sym_3s (const char *name, int elemental, int actual_ok, bt type, sf.f3 = simplify; rf.s1 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -547,7 +554,7 @@ static void add_sym_3s (const char *name, int elemental, int actual_ok, bt type, static void add_sym_4 (const char *name, int elemental, int actual_ok, bt type, - int kind, + int kind, int standard, try (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), @@ -564,7 +571,7 @@ static void add_sym_4 (const char *name, int elemental, int actual_ok, bt type, sf.f4 = simplify; rf.f4 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -574,7 +581,7 @@ static void add_sym_4 (const char *name, int elemental, int actual_ok, bt type, static void add_sym_4s (const char *name, int elemental, int actual_ok, - bt type, int kind, + bt type, int kind, int standard, try (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_code *), @@ -591,7 +598,7 @@ static void add_sym_4s (const char *name, int elemental, int actual_ok, sf.f4 = simplify; rf.s1 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -602,7 +609,8 @@ static void add_sym_4s (const char *name, int elemental, int actual_ok, static void add_sym_5s ( - const char *name, int elemental, int actual_ok, bt type, int kind, + const char *name, int elemental, int actual_ok, + bt type, int kind, int standard, try (*check)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), gfc_expr *(*simplify)(gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *,gfc_expr *), void (*resolve)(gfc_code *), @@ -620,7 +628,7 @@ static void add_sym_5s sf.f5 = simplify; rf.s1 = resolve; - add_sym (name, elemental, actual_ok, type, kind, cf, sf, rf, + add_sym (name, elemental, actual_ok, type, kind, standard, cf, sf, rf, a1, type1, kind1, optional1, a2, type2, kind2, optional2, a3, type3, kind3, optional3, @@ -719,10 +727,13 @@ gfc_intrinsic_name (const char *name, int subroutine_flag) functions associated with that generic. */ static void -make_generic (const char *name, gfc_generic_isym_id generic_id) +make_generic (const char *name, gfc_generic_isym_id generic_id, int standard) { gfc_intrinsic_sym *g; + if (!(gfc_option.allow_std & standard)) + return; + if (sizing != SZ_NOTHING) return; @@ -813,794 +824,810 @@ add_functions (void) dz = gfc_default_complex_kind; ii = gfc_index_integer_kind; - add_sym_1 ("abs", 1, 1, BT_REAL, dr, + add_sym_1 ("abs", 1, 1, BT_REAL, dr, GFC_STD_F77, gfc_check_abs, gfc_simplify_abs, gfc_resolve_abs, a, BT_REAL, dr, 0); - add_sym_1 ("iabs", 1, 1, BT_INTEGER, di, + add_sym_1 ("iabs", 1, 1, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_abs, gfc_resolve_abs, a, BT_INTEGER, di, 0); - add_sym_1 ("dabs", 1, 1, BT_REAL, dd, + add_sym_1 ("dabs", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_abs, gfc_resolve_abs, a, BT_REAL, dd, 0); - add_sym_1 ("cabs", 1, 1, BT_REAL, dr, + add_sym_1 ("cabs", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_abs, gfc_resolve_abs, a, BT_COMPLEX, dz, 0); - add_sym_1 ("zabs", 1, 1, BT_REAL, dd, NULL, gfc_simplify_abs, gfc_resolve_abs, a, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("zabs", 1, 1, BT_REAL, dd, GFC_STD_GNU, + NULL, gfc_simplify_abs, gfc_resolve_abs, + a, BT_COMPLEX, dd, 0); make_alias ("cdabs"); - make_generic ("abs", GFC_ISYM_ABS); + make_generic ("abs", GFC_ISYM_ABS, GFC_STD_F77); - add_sym_1 ("achar", 1, 1, BT_CHARACTER, dc, + add_sym_1 ("achar", 1, 1, BT_CHARACTER, dc, GFC_STD_F95, NULL, gfc_simplify_achar, NULL, i, BT_INTEGER, di, 0); - make_generic ("achar", GFC_ISYM_ACHAR); + make_generic ("achar", GFC_ISYM_ACHAR, GFC_STD_F95); - add_sym_1 ("acos", 1, 1, BT_REAL, dr, + add_sym_1 ("acos", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_acos, gfc_resolve_acos, x, BT_REAL, dr, 0); - add_sym_1 ("dacos", 1, 1, BT_REAL, dd, + add_sym_1 ("dacos", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_acos, gfc_resolve_acos, x, BT_REAL, dd, 0); - make_generic ("acos", GFC_ISYM_ACOS); + make_generic ("acos", GFC_ISYM_ACOS, GFC_STD_F77); - add_sym_1 ("adjustl", 1, 1, BT_CHARACTER, dc, + add_sym_1 ("adjustl", 1, 1, BT_CHARACTER, dc, GFC_STD_F95, NULL, gfc_simplify_adjustl, NULL, stg, BT_CHARACTER, dc, 0); - make_generic ("adjustl", GFC_ISYM_ADJUSTL); + make_generic ("adjustl", GFC_ISYM_ADJUSTL, GFC_STD_F95); - add_sym_1 ("adjustr", 1, 1, BT_CHARACTER, dc, + add_sym_1 ("adjustr", 1, 1, BT_CHARACTER, dc, GFC_STD_F95, NULL, gfc_simplify_adjustr, NULL, stg, BT_CHARACTER, dc, 0); - make_generic ("adjustr", GFC_ISYM_ADJUSTR); + make_generic ("adjustr", GFC_ISYM_ADJUSTR, GFC_STD_F95); - add_sym_1 ("aimag", 1, 1, BT_REAL, dr, + add_sym_1 ("aimag", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_aimag, gfc_resolve_aimag, z, BT_COMPLEX, dz, 0); - add_sym_1 ("dimag", 1, 1, BT_REAL, dd, NULL, gfc_simplify_aimag, gfc_resolve_aimag, z, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("dimag", 1, 1, BT_REAL, dd, GFC_STD_GNU, + NULL, gfc_simplify_aimag, gfc_resolve_aimag, + z, BT_COMPLEX, dd, 0); - make_generic ("aimag", GFC_ISYM_AIMAG); + make_generic ("aimag", GFC_ISYM_AIMAG, GFC_STD_F77); - add_sym_2 ("aint", 1, 1, BT_REAL, dr, + add_sym_2 ("aint", 1, 1, BT_REAL, dr, GFC_STD_F77, gfc_check_a_xkind, gfc_simplify_aint, gfc_resolve_aint, a, BT_REAL, dr, 0, kind, BT_INTEGER, di, 1); - add_sym_1 ("dint", 1, 1, BT_REAL, dd, + add_sym_1 ("dint", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_dint, gfc_resolve_dint, a, BT_REAL, dd, 0); - make_generic ("aint", GFC_ISYM_AINT); + make_generic ("aint", GFC_ISYM_AINT, GFC_STD_F77); - add_sym_2 ("all", 0, 1, BT_UNKNOWN, 0, + add_sym_2 ("all", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_all_any, NULL, gfc_resolve_all, msk, BT_LOGICAL, dl, 0, dm, BT_INTEGER, ii, 1); - make_generic ("all", GFC_ISYM_ALL); + make_generic ("all", GFC_ISYM_ALL, GFC_STD_F95); - add_sym_1 ("allocated", 0, 1, BT_LOGICAL, dl, + add_sym_1 ("allocated", 0, 1, BT_LOGICAL, dl, GFC_STD_F95, gfc_check_allocated, NULL, NULL, ar, BT_UNKNOWN, 0, 0); - make_generic ("allocated", GFC_ISYM_ALLOCATED); + make_generic ("allocated", GFC_ISYM_ALLOCATED, GFC_STD_F95); - add_sym_2 ("anint", 1, 1, BT_REAL, dr, + add_sym_2 ("anint", 1, 1, BT_REAL, dr, GFC_STD_F77, gfc_check_a_xkind, gfc_simplify_anint, gfc_resolve_anint, a, BT_REAL, dr, 0, kind, BT_INTEGER, di, 1); - add_sym_1 ("dnint", 1, 1, BT_REAL, dd, + add_sym_1 ("dnint", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_dnint, gfc_resolve_dnint, a, BT_REAL, dd, 0); - make_generic ("anint", GFC_ISYM_ANINT); + make_generic ("anint", GFC_ISYM_ANINT, GFC_STD_F77); - add_sym_2 ("any", 0, 1, BT_UNKNOWN, 0, + add_sym_2 ("any", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_all_any, NULL, gfc_resolve_any, msk, BT_LOGICAL, dl, 0, dm, BT_INTEGER, ii, 1); - make_generic ("any", GFC_ISYM_ANY); + make_generic ("any", GFC_ISYM_ANY, GFC_STD_F95); - add_sym_1 ("asin", 1, 1, BT_REAL, dr, + add_sym_1 ("asin", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_asin, gfc_resolve_asin, x, BT_REAL, dr, 0); - add_sym_1 ("dasin", 1, 1, BT_REAL, dd, + add_sym_1 ("dasin", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_asin, gfc_resolve_asin, x, BT_REAL, dd, 0); - make_generic ("asin", GFC_ISYM_ASIN); + make_generic ("asin", GFC_ISYM_ASIN, GFC_STD_F77); - add_sym_2 ("associated", 0, 1, BT_LOGICAL, dl, + add_sym_2 ("associated", 0, 1, BT_LOGICAL, dl, GFC_STD_F95, gfc_check_associated, NULL, NULL, pt, BT_UNKNOWN, 0, 0, tg, BT_UNKNOWN, 0, 1); - make_generic ("associated", GFC_ISYM_ASSOCIATED); + make_generic ("associated", GFC_ISYM_ASSOCIATED, GFC_STD_F95); - add_sym_1 ("atan", 1, 1, BT_REAL, dr, + add_sym_1 ("atan", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_atan, gfc_resolve_atan, x, BT_REAL, dr, 0); - add_sym_1 ("datan", 1, 1, BT_REAL, dd, + add_sym_1 ("datan", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_atan, gfc_resolve_atan, x, BT_REAL, dd, 0); - make_generic ("atan", GFC_ISYM_ATAN); + make_generic ("atan", GFC_ISYM_ATAN, GFC_STD_F77); - add_sym_2 ("atan2", 1, 1, BT_REAL, dr, + add_sym_2 ("atan2", 1, 1, BT_REAL, dr, GFC_STD_F77, gfc_check_atan2, gfc_simplify_atan2, gfc_resolve_atan2, y, BT_REAL, dr, 0, x, BT_REAL, dr, 0); - add_sym_2 ("datan2", 1, 1, BT_REAL, dd, + add_sym_2 ("datan2", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_atan2, gfc_resolve_atan2, y, BT_REAL, dd, 0, x, BT_REAL, dd, 0); - make_generic ("atan2", GFC_ISYM_ATAN2); + make_generic ("atan2", GFC_ISYM_ATAN2, GFC_STD_F77); /* Bessel and Neumann functions for G77 compatibility. */ - add_sym_1 ("besj0", 1, 0, BT_REAL, dr, + add_sym_1 ("besj0", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dr, 0); - add_sym_1 ("dbesj0", 1, 0, BT_REAL, dd, + add_sym_1 ("dbesj0", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dd, 0); - make_generic ("besj0", GFC_ISYM_J0); + make_generic ("besj0", GFC_ISYM_J0, GFC_STD_GNU); - add_sym_1 ("besj1", 1, 0, BT_REAL, dr, + add_sym_1 ("besj1", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dr, 1); - add_sym_1 ("dbesj1", 1, 0, BT_REAL, dd, + add_sym_1 ("dbesj1", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dd, 1); - make_generic ("besj1", GFC_ISYM_J1); + make_generic ("besj1", GFC_ISYM_J1, GFC_STD_GNU); - add_sym_2 ("besjn", 1, 0, BT_REAL, dr, + add_sym_2 ("besjn", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_besn, NULL, gfc_resolve_besn, n, BT_INTEGER, di, 1, x, BT_REAL, dr, 1); - add_sym_2 ("dbesjn", 1, 0, BT_REAL, dd, + add_sym_2 ("dbesjn", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_besn, NULL, gfc_resolve_besn, n, BT_INTEGER, di, 1, x, BT_REAL, dd, 1); - make_generic ("besjn", GFC_ISYM_JN); + make_generic ("besjn", GFC_ISYM_JN, GFC_STD_GNU); - add_sym_1 ("besy0", 1, 0, BT_REAL, dr, + add_sym_1 ("besy0", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dr, 0); - add_sym_1 ("dbesy0", 1, 0, BT_REAL, dd, + add_sym_1 ("dbesy0", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dd, 0); - make_generic ("besy0", GFC_ISYM_Y0); + make_generic ("besy0", GFC_ISYM_Y0, GFC_STD_GNU); - add_sym_1 ("besy1", 1, 0, BT_REAL, dr, + add_sym_1 ("besy1", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dr, 1); - add_sym_1 ("dbesy1", 1, 0, BT_REAL, dd, + add_sym_1 ("dbesy1", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dd, 1); - make_generic ("besy1", GFC_ISYM_Y1); + make_generic ("besy1", GFC_ISYM_Y1, GFC_STD_GNU); - add_sym_2 ("besyn", 1, 0, BT_REAL, dr, + add_sym_2 ("besyn", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_besn, NULL, gfc_resolve_besn, n, BT_INTEGER, di, 1, x, BT_REAL, dr, 1); - add_sym_2 ("dbesyn", 1, 0, BT_REAL, dd, + add_sym_2 ("dbesyn", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_besn, NULL, gfc_resolve_besn, n, BT_INTEGER, di, 1, x, BT_REAL, dd, 1); - make_generic ("besyn", GFC_ISYM_YN); + make_generic ("besyn", GFC_ISYM_YN, GFC_STD_GNU); - add_sym_1 ("bit_size", 0, 1, BT_INTEGER, di, + add_sym_1 ("bit_size", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_i, gfc_simplify_bit_size, NULL, i, BT_INTEGER, di, 0); - make_generic ("bit_size", GFC_ISYM_NONE); + make_generic ("bit_size", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_2 ("btest", 1, 1, BT_LOGICAL, dl, + add_sym_2 ("btest", 1, 1, BT_LOGICAL, dl, GFC_STD_F95, gfc_check_btest, gfc_simplify_btest, gfc_resolve_btest, i, BT_INTEGER, di, 0, pos, BT_INTEGER, di, 0); - make_generic ("btest", GFC_ISYM_BTEST); + make_generic ("btest", GFC_ISYM_BTEST, GFC_STD_F95); - add_sym_2 ("ceiling", 1, 1, BT_INTEGER, di, + add_sym_2 ("ceiling", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_a_ikind, gfc_simplify_ceiling, gfc_resolve_ceiling, a, BT_REAL, dr, 0, kind, BT_INTEGER, di, 1); - make_generic ("ceiling", GFC_ISYM_CEILING); + make_generic ("ceiling", GFC_ISYM_CEILING, GFC_STD_F95); - add_sym_2 ("char", 1, 0, BT_CHARACTER, dc, + add_sym_2 ("char", 1, 0, BT_CHARACTER, dc, GFC_STD_F77, gfc_check_char, gfc_simplify_char, gfc_resolve_char, i, BT_INTEGER, di, 0, kind, BT_INTEGER, di, 1); - make_generic ("char", GFC_ISYM_CHAR); + make_generic ("char", GFC_ISYM_CHAR, GFC_STD_F77); - add_sym_3 ("cmplx", 1, 1, BT_COMPLEX, dz, + add_sym_3 ("cmplx", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, gfc_check_cmplx, gfc_simplify_cmplx, gfc_resolve_cmplx, x, BT_UNKNOWN, dr, 0, y, BT_UNKNOWN, dr, 1, kind, BT_INTEGER, di, 1); - make_generic ("cmplx", GFC_ISYM_CMPLX); + make_generic ("cmplx", GFC_ISYM_CMPLX, GFC_STD_F77); /* Making dcmplx a specific of cmplx causes cmplx to return a double complex instead of the default complex. */ - add_sym_2 ("dcmplx", 1, 1, BT_COMPLEX, dd, + add_sym_2 ("dcmplx", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, gfc_check_dcmplx, gfc_simplify_dcmplx, gfc_resolve_dcmplx, - x, BT_REAL, dd, 0, y, BT_REAL, dd, 1); /* Extension */ + x, BT_REAL, dd, 0, y, BT_REAL, dd, 1); - make_generic ("dcmplx", GFC_ISYM_CMPLX); + make_generic ("dcmplx", GFC_ISYM_CMPLX, GFC_STD_GNU); - add_sym_1 ("conjg", 1, 1, BT_COMPLEX, dz, + add_sym_1 ("conjg", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, NULL, gfc_simplify_conjg, gfc_resolve_conjg, z, BT_COMPLEX, dz, 0); - add_sym_1 ("dconjg", 1, 1, BT_COMPLEX, dd, NULL, gfc_simplify_conjg, gfc_resolve_conjg, z, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("dconjg", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, + NULL, gfc_simplify_conjg, gfc_resolve_conjg, + z, BT_COMPLEX, dd, 0); - make_generic ("conjg", GFC_ISYM_CONJG); + make_generic ("conjg", GFC_ISYM_CONJG, GFC_STD_F77); - add_sym_1 ("cos", 1, 1, BT_REAL, dr, + add_sym_1 ("cos", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_cos, gfc_resolve_cos, x, BT_REAL, dr, 0); - add_sym_1 ("dcos", 1, 1, BT_REAL, dd, + add_sym_1 ("dcos", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_cos, gfc_resolve_cos, x, BT_REAL, dd, 0); - add_sym_1 ("ccos", 1, 1, BT_COMPLEX, dz, + add_sym_1 ("ccos", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, NULL, gfc_simplify_cos, gfc_resolve_cos, x, BT_COMPLEX, dz, 0); - add_sym_1 ("zcos", 1, 1, BT_COMPLEX, dd, NULL, gfc_simplify_cos, gfc_resolve_cos, x, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("zcos", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, + NULL, gfc_simplify_cos, gfc_resolve_cos, + x, BT_COMPLEX, dd, 0); make_alias ("cdcos"); - make_generic ("cos", GFC_ISYM_COS); + make_generic ("cos", GFC_ISYM_COS, GFC_STD_F77); - add_sym_1 ("cosh", 1, 1, BT_REAL, dr, + add_sym_1 ("cosh", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_cosh, gfc_resolve_cosh, x, BT_REAL, dr, 0); - add_sym_1 ("dcosh", 1, 1, BT_REAL, dd, + add_sym_1 ("dcosh", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_cosh, gfc_resolve_cosh, x, BT_REAL, dd, 0); - make_generic ("cosh", GFC_ISYM_COSH); + make_generic ("cosh", GFC_ISYM_COSH, GFC_STD_F77); - add_sym_2 ("count", 0, 1, BT_INTEGER, di, + add_sym_2 ("count", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_count, NULL, gfc_resolve_count, msk, BT_LOGICAL, dl, 0, dm, BT_INTEGER, ii, 1); - make_generic ("count", GFC_ISYM_COUNT); + make_generic ("count", GFC_ISYM_COUNT, GFC_STD_F95); - add_sym_3 ("cshift", 0, 1, BT_REAL, dr, + add_sym_3 ("cshift", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_cshift, NULL, gfc_resolve_cshift, ar, BT_REAL, dr, 0, sh, BT_INTEGER, di, 0, dm, BT_INTEGER, ii, 1); - make_generic ("cshift", GFC_ISYM_CSHIFT); + make_generic ("cshift", GFC_ISYM_CSHIFT, GFC_STD_F95); - add_sym_1 ("dble", 1, 1, BT_REAL, dd, + add_sym_1 ("dble", 1, 1, BT_REAL, dd, GFC_STD_F77, gfc_check_dble, gfc_simplify_dble, gfc_resolve_dble, a, BT_REAL, dr, 0); make_alias ("dfloat"); - make_generic ("dble", GFC_ISYM_DBLE); + make_generic ("dble", GFC_ISYM_DBLE, GFC_STD_F77); - add_sym_1 ("digits", 0, 1, BT_INTEGER, di, + add_sym_1 ("digits", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_digits, gfc_simplify_digits, NULL, x, BT_UNKNOWN, dr, 0); - make_generic ("digits", GFC_ISYM_NONE); + make_generic ("digits", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_2 ("dim", 1, 1, BT_REAL, dr, + add_sym_2 ("dim", 1, 1, BT_REAL, dr, GFC_STD_F77, gfc_check_a_p, gfc_simplify_dim, gfc_resolve_dim, x, BT_UNKNOWN, dr, 0, y, BT_UNKNOWN, dr, 0); - add_sym_2 ("idim", 1, 1, BT_INTEGER, di, + add_sym_2 ("idim", 1, 1, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_dim, gfc_resolve_dim, x, BT_INTEGER, di, 0, y, BT_INTEGER, di, 0); - add_sym_2 ("ddim", 1, 1, BT_REAL, dd, + add_sym_2 ("ddim", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_dim, gfc_resolve_dim, x, BT_REAL, dd, 0, y, BT_REAL, dd, 0); - make_generic ("dim", GFC_ISYM_DIM); + make_generic ("dim", GFC_ISYM_DIM, GFC_STD_F77); - add_sym_2 ("dot_product", 0, 1, BT_UNKNOWN, 0, + add_sym_2 ("dot_product", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_dot_product, NULL, gfc_resolve_dot_product, va, BT_REAL, dr, 0, vb, BT_REAL, dr, 0); - make_generic ("dot_product", GFC_ISYM_DOT_PRODUCT); + make_generic ("dot_product", GFC_ISYM_DOT_PRODUCT, GFC_STD_F95); - add_sym_2 ("dprod", 1, 1, BT_REAL, dd, + add_sym_2 ("dprod", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_dprod, gfc_resolve_dprod, x, BT_REAL, dr, 0, y, BT_REAL, dr, 0); - make_generic ("dprod", GFC_ISYM_DPROD); + make_generic ("dprod", GFC_ISYM_DPROD, GFC_STD_F77); - add_sym_1 ("dreal", 1, 0, BT_REAL, dd, NULL, NULL, NULL, a, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("dreal", 1, 0, BT_REAL, dd, GFC_STD_GNU, + NULL, NULL, NULL, a, BT_COMPLEX, dd, 0); - make_generic ("dreal", GFC_ISYM_REAL); + make_generic ("dreal", GFC_ISYM_REAL, GFC_STD_GNU); - add_sym_4 ("eoshift", 0, 1, BT_REAL, dr, + add_sym_4 ("eoshift", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_eoshift, NULL, gfc_resolve_eoshift, ar, BT_REAL, dr, 0, sh, BT_INTEGER, ii, 0, bd, BT_REAL, dr, 1, dm, BT_INTEGER, ii, 1); - make_generic ("eoshift", GFC_ISYM_EOSHIFT); + make_generic ("eoshift", GFC_ISYM_EOSHIFT, GFC_STD_F95); - add_sym_1 ("epsilon", 0, 1, BT_REAL, dr, + add_sym_1 ("epsilon", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_x, gfc_simplify_epsilon, NULL, x, BT_REAL, dr, 0); - make_generic ("epsilon", GFC_ISYM_NONE); + make_generic ("epsilon", GFC_ISYM_NONE, GFC_STD_F95); /* G77 compatibility for the ERF() and ERFC() functions. */ - add_sym_1 ("erf", 1, 0, BT_REAL, dr, + add_sym_1 ("erf", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dr, 0); - add_sym_1 ("derf", 1, 0, BT_REAL, dd, + add_sym_1 ("derf", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dd, 0); - make_generic ("erf", GFC_ISYM_ERF); + make_generic ("erf", GFC_ISYM_ERF, GFC_STD_GNU); - add_sym_1 ("erfc", 1, 0, BT_REAL, dr, + add_sym_1 ("erfc", 1, 0, BT_REAL, dr, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dr, 0); - add_sym_1 ("derfc", 1, 0, BT_REAL, dd, + add_sym_1 ("derfc", 1, 0, BT_REAL, dd, GFC_STD_GNU, gfc_check_g77_math1, NULL, gfc_resolve_g77_math1, x, BT_REAL, dd, 0); - make_generic ("erfc", GFC_ISYM_ERFC); + make_generic ("erfc", GFC_ISYM_ERFC, GFC_STD_GNU); /* G77 compatibility */ - add_sym_1 ("etime", 0, 1, BT_REAL, 4, + add_sym_1 ("etime", 0, 1, BT_REAL, 4, GFC_STD_GNU, gfc_check_etime, NULL, NULL, x, BT_REAL, 4, 0); make_alias ("dtime"); - make_generic ("etime", GFC_ISYM_ETIME); + make_generic ("etime", GFC_ISYM_ETIME, GFC_STD_GNU); - add_sym_1 ("exp", 1, 1, BT_REAL, dr, + add_sym_1 ("exp", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_exp, gfc_resolve_exp, x, BT_REAL, dr, 0); - add_sym_1 ("dexp", 1, 1, BT_REAL, dd, + add_sym_1 ("dexp", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_exp, gfc_resolve_exp, x, BT_REAL, dd, 0); - add_sym_1 ("cexp", 1, 1, BT_COMPLEX, dz, + add_sym_1 ("cexp", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, NULL, gfc_simplify_exp, gfc_resolve_exp, x, BT_COMPLEX, dz, 0); - add_sym_1 ("zexp", 1, 1, BT_COMPLEX, dd, NULL, gfc_simplify_exp, gfc_resolve_exp, x, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("zexp", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, + NULL, gfc_simplify_exp, gfc_resolve_exp, + x, BT_COMPLEX, dd, 0); make_alias ("cdexp"); - make_generic ("exp", GFC_ISYM_EXP); + make_generic ("exp", GFC_ISYM_EXP, GFC_STD_F77); - add_sym_1 ("exponent", 1, 1, BT_INTEGER, di, + add_sym_1 ("exponent", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_x, gfc_simplify_exponent, gfc_resolve_exponent, x, BT_REAL, dr, 0); - make_generic ("exponent", GFC_ISYM_EXPONENT); + make_generic ("exponent", GFC_ISYM_EXPONENT, GFC_STD_F95); - add_sym_2 ("floor", 1, 1, BT_INTEGER, di, + add_sym_2 ("floor", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_a_ikind, gfc_simplify_floor, gfc_resolve_floor, a, BT_REAL, dr, 0, kind, BT_INTEGER, di, 1); - make_generic ("floor", GFC_ISYM_FLOOR); + make_generic ("floor", GFC_ISYM_FLOOR, GFC_STD_F95); - add_sym_1 ("fraction", 1, 1, BT_REAL, dr, + add_sym_1 ("fraction", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_x, gfc_simplify_fraction, gfc_resolve_fraction, x, BT_REAL, dr, 0); - make_generic ("fraction", GFC_ISYM_FRACTION); + make_generic ("fraction", GFC_ISYM_FRACTION, GFC_STD_F95); /* Unix IDs (g77 compatibility) */ - add_sym_1 ("getcwd", 0, 1, BT_INTEGER, di, NULL, NULL, gfc_resolve_getcwd, + add_sym_1 ("getcwd", 0, 1, BT_INTEGER, di, GFC_STD_GNU, + NULL, NULL, gfc_resolve_getcwd, c, BT_CHARACTER, dc, 0); - make_generic ("getcwd", GFC_ISYM_GETCWD); + make_generic ("getcwd", GFC_ISYM_GETCWD, GFC_STD_GNU); - add_sym_0 ("getgid", 1, 0, BT_INTEGER, di, NULL, NULL, gfc_resolve_getgid); - make_generic ("getgid", GFC_ISYM_GETGID); + add_sym_0 ("getgid", 1, 0, BT_INTEGER, di, GFC_STD_GNU, + NULL, NULL, gfc_resolve_getgid); + make_generic ("getgid", GFC_ISYM_GETGID, GFC_STD_GNU); - add_sym_0 ("getpid", 1, 0, BT_INTEGER, di, NULL, NULL, gfc_resolve_getpid); - make_generic ("getpid", GFC_ISYM_GETPID); + add_sym_0 ("getpid", 1, 0, BT_INTEGER, di, GFC_STD_GNU, + NULL, NULL, gfc_resolve_getpid); + make_generic ("getpid", GFC_ISYM_GETPID, GFC_STD_GNU); - add_sym_0 ("getuid", 1, 0, BT_INTEGER, di, NULL, NULL, gfc_resolve_getuid); - make_generic ("getuid", GFC_ISYM_GETUID); + add_sym_0 ("getuid", 1, 0, BT_INTEGER, di, GFC_STD_GNU, + NULL, NULL, gfc_resolve_getuid); + make_generic ("getuid", GFC_ISYM_GETUID, GFC_STD_GNU); - add_sym_1 ("huge", 0, 1, BT_REAL, dr, + add_sym_1 ("huge", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_huge, gfc_simplify_huge, NULL, x, BT_UNKNOWN, dr, 0); - make_generic ("huge", GFC_ISYM_NONE); + make_generic ("huge", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_1 ("iachar", 1, 1, BT_INTEGER, di, + add_sym_1 ("iachar", 1, 1, BT_INTEGER, di, GFC_STD_F95, NULL, gfc_simplify_iachar, NULL, c, BT_CHARACTER, dc, 0); - make_generic ("iachar", GFC_ISYM_IACHAR); + make_generic ("iachar", GFC_ISYM_IACHAR, GFC_STD_F95); - add_sym_2 ("iand", 1, 1, BT_INTEGER, di, + add_sym_2 ("iand", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_iand, gfc_simplify_iand, gfc_resolve_iand, i, BT_INTEGER, di, 0, j, BT_INTEGER, di, 0); - make_generic ("iand", GFC_ISYM_IAND); + make_generic ("iand", GFC_ISYM_IAND, GFC_STD_F95); - add_sym_0 ("iargc", 1, 1, BT_INTEGER, di, NULL, NULL, NULL); /* Extension, takes no arguments */ - make_generic ("iargc", GFC_ISYM_IARGC); + add_sym_0 ("iargc", 1, 1, BT_INTEGER, di, GFC_STD_GNU,NULL, NULL, NULL); + make_generic ("iargc", GFC_ISYM_IARGC, GFC_STD_GNU); - add_sym_0 ("command_argument_count", 1, 1, BT_INTEGER, di, NULL, NULL, NULL); - make_generic ("command_argument_count", GFC_ISYM_COMMAND_ARGUMENT_COUNT); + add_sym_0 ("command_argument_count", 1, 1, BT_INTEGER, di, GFC_STD_F2003, NULL, NULL, NULL); + make_generic ("command_argument_count", GFC_ISYM_COMMAND_ARGUMENT_COUNT, GFC_STD_F2003); - add_sym_2 ("ibclr", 1, 1, BT_INTEGER, di, + add_sym_2 ("ibclr", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ibclr, gfc_simplify_ibclr, gfc_resolve_ibclr, i, BT_INTEGER, di, 0, pos, BT_INTEGER, di, 0); - make_generic ("ibclr", GFC_ISYM_IBCLR); + make_generic ("ibclr", GFC_ISYM_IBCLR, GFC_STD_F95); - add_sym_3 ("ibits", 1, 1, BT_INTEGER, di, + add_sym_3 ("ibits", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ibits, gfc_simplify_ibits, gfc_resolve_ibits, i, BT_INTEGER, di, 0, pos, BT_INTEGER, di, 0, ln, BT_INTEGER, di, 0); - make_generic ("ibits", GFC_ISYM_IBITS); + make_generic ("ibits", GFC_ISYM_IBITS, GFC_STD_F95); - add_sym_2 ("ibset", 1, 1, BT_INTEGER, di, + add_sym_2 ("ibset", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ibset, gfc_simplify_ibset, gfc_resolve_ibset, i, BT_INTEGER, di, 0, pos, BT_INTEGER, di, 0); - make_generic ("ibset", GFC_ISYM_IBSET); + make_generic ("ibset", GFC_ISYM_IBSET, GFC_STD_F95); - add_sym_1 ("ichar", 1, 0, BT_INTEGER, di, + add_sym_1 ("ichar", 1, 0, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_ichar, gfc_resolve_ichar, c, BT_CHARACTER, dc, 0); - make_generic ("ichar", GFC_ISYM_ICHAR); + make_generic ("ichar", GFC_ISYM_ICHAR, GFC_STD_F77); - add_sym_2 ("ieor", 1, 1, BT_INTEGER, di, + add_sym_2 ("ieor", 1, 1, BT_INTEGER, di, GFC_STD_GNU, gfc_check_ieor, gfc_simplify_ieor, gfc_resolve_ieor, i, BT_INTEGER, di, 0, j, BT_INTEGER, di, 0); - make_generic ("ieor", GFC_ISYM_IEOR); + make_generic ("ieor", GFC_ISYM_IEOR, GFC_STD_GNU); - add_sym_3 ("index", 1, 1, BT_INTEGER, di, + add_sym_3 ("index", 1, 1, BT_INTEGER, di, GFC_STD_F77, gfc_check_index, gfc_simplify_index, NULL, stg, BT_CHARACTER, dc, 0, ssg, BT_CHARACTER, dc, 0, bck, BT_LOGICAL, dl, 1); - make_generic ("index", GFC_ISYM_INDEX); + make_generic ("index", GFC_ISYM_INDEX, GFC_STD_F77); - add_sym_2 ("int", 1, 1, BT_INTEGER, di, + add_sym_2 ("int", 1, 1, BT_INTEGER, di, GFC_STD_F77, gfc_check_int, gfc_simplify_int, gfc_resolve_int, a, BT_REAL, dr, 0, kind, BT_INTEGER, di, 1); - add_sym_1 ("ifix", 1, 0, BT_INTEGER, di, + add_sym_1 ("ifix", 1, 0, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_ifix, NULL, a, BT_REAL, dr, 0); - add_sym_1 ("idint", 1, 0, BT_INTEGER, di, + add_sym_1 ("idint", 1, 0, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_idint, NULL, a, BT_REAL, dd, 0); - make_generic ("int", GFC_ISYM_INT); + make_generic ("int", GFC_ISYM_INT, GFC_STD_F77); - add_sym_2 ("ior", 1, 1, BT_INTEGER, di, + add_sym_2 ("ior", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ior, gfc_simplify_ior, gfc_resolve_ior, i, BT_INTEGER, di, 0, j, BT_INTEGER, di, 0); - make_generic ("ior", GFC_ISYM_IOR); + make_generic ("ior", GFC_ISYM_IOR, GFC_STD_F95); /* The following function is for G77 compatibility. */ - add_sym_1 ("irand", 0, 1, BT_INTEGER, 4, + add_sym_1 ("irand", 0, 1, BT_INTEGER, 4, GFC_STD_GNU, gfc_check_irand, NULL, NULL, i, BT_INTEGER, 4, 1); - make_generic ("irand", GFC_ISYM_IRAND); + make_generic ("irand", GFC_ISYM_IRAND, GFC_STD_GNU); - add_sym_2 ("ishft", 1, 1, BT_INTEGER, di, + add_sym_2 ("ishft", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ishft, gfc_simplify_ishft, gfc_resolve_ishft, i, BT_INTEGER, di, 0, sh, BT_INTEGER, di, 0); - make_generic ("ishft", GFC_ISYM_ISHFT); + make_generic ("ishft", GFC_ISYM_ISHFT, GFC_STD_F95); - add_sym_3 ("ishftc", 1, 1, BT_INTEGER, di, + add_sym_3 ("ishftc", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ishftc, gfc_simplify_ishftc, gfc_resolve_ishftc, i, BT_INTEGER, di, 0, sh, BT_INTEGER, di, 0, sz, BT_INTEGER, di, 1); - make_generic ("ishftc", GFC_ISYM_ISHFTC); + make_generic ("ishftc", GFC_ISYM_ISHFTC, GFC_STD_F95); - add_sym_1 ("kind", 0, 1, BT_INTEGER, di, + add_sym_1 ("kind", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_kind, gfc_simplify_kind, NULL, x, BT_REAL, dr, 0); - make_generic ("kind", GFC_ISYM_NONE); + make_generic ("kind", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_2 ("lbound", 0, 1, BT_INTEGER, di, + add_sym_2 ("lbound", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_lbound, gfc_simplify_lbound, gfc_resolve_lbound, ar, BT_REAL, dr, 0, dm, BT_INTEGER, di, 1); - make_generic ("lbound", GFC_ISYM_LBOUND); + make_generic ("lbound", GFC_ISYM_LBOUND, GFC_STD_F95); - add_sym_1 ("len", 0, 1, BT_INTEGER, di, + add_sym_1 ("len", 0, 1, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_len, gfc_resolve_len, stg, BT_CHARACTER, dc, 0); - make_generic ("len", GFC_ISYM_LEN); + make_generic ("len", GFC_ISYM_LEN, GFC_STD_F77); - add_sym_1 ("len_trim", 1, 1, BT_INTEGER, di, + add_sym_1 ("len_trim", 1, 1, BT_INTEGER, di, GFC_STD_F95, NULL, gfc_simplify_len_trim, gfc_resolve_len_trim, stg, BT_CHARACTER, dc, 0); - make_generic ("len_trim", GFC_ISYM_LEN_TRIM); + make_generic ("len_trim", GFC_ISYM_LEN_TRIM, GFC_STD_F95); - add_sym_2 ("lge", 1, 0, BT_LOGICAL, dl, + add_sym_2 ("lge", 1, 0, BT_LOGICAL, dl, GFC_STD_F77, NULL, gfc_simplify_lge, NULL, sta, BT_CHARACTER, dc, 0, stb, BT_CHARACTER, dc, 0); - make_generic ("lge", GFC_ISYM_LGE); + make_generic ("lge", GFC_ISYM_LGE, GFC_STD_F77); - add_sym_2 ("lgt", 1, 0, BT_LOGICAL, dl, + add_sym_2 ("lgt", 1, 0, BT_LOGICAL, dl, GFC_STD_F77, NULL, gfc_simplify_lgt, NULL, sta, BT_CHARACTER, dc, 0, stb, BT_CHARACTER, dc, 0); - make_generic ("lgt", GFC_ISYM_LGT); + make_generic ("lgt", GFC_ISYM_LGT, GFC_STD_F77); - add_sym_2 ("lle", 1, 0, BT_LOGICAL, dl, + add_sym_2 ("lle", 1, 0, BT_LOGICAL, dl, GFC_STD_F77, NULL, gfc_simplify_lle, NULL, sta, BT_CHARACTER, dc, 0, stb, BT_CHARACTER, dc, 0); - make_generic ("lle", GFC_ISYM_LLE); + make_generic ("lle", GFC_ISYM_LLE, GFC_STD_F77); - add_sym_2 ("llt", 1, 0, BT_LOGICAL, dl, + add_sym_2 ("llt", 1, 0, BT_LOGICAL, dl, GFC_STD_F77, NULL, gfc_simplify_llt, NULL, sta, BT_CHARACTER, dc, 0, stb, BT_CHARACTER, dc, 0); - make_generic ("llt", GFC_ISYM_LLT); + make_generic ("llt", GFC_ISYM_LLT, GFC_STD_F77); - add_sym_1 ("log", 1, 1, BT_REAL, dr, + add_sym_1 ("log", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_log, gfc_resolve_log, x, BT_REAL, dr, 0); - add_sym_1 ("alog", 1, 1, BT_REAL, dr, + add_sym_1 ("alog", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_log, gfc_resolve_log, x, BT_REAL, dr, 0); - add_sym_1 ("dlog", 1, 1, BT_REAL, dd, + add_sym_1 ("dlog", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_log, gfc_resolve_log, x, BT_REAL, dd, 0); - add_sym_1 ("clog", 1, 1, BT_COMPLEX, dz, + add_sym_1 ("clog", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, NULL, gfc_simplify_log, gfc_resolve_log, x, BT_COMPLEX, dz, 0); - add_sym_1 ("zlog", 1, 1, BT_COMPLEX, dd, NULL, gfc_simplify_log, gfc_resolve_log, x, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("zlog", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, + NULL, gfc_simplify_log, gfc_resolve_log, x, BT_COMPLEX, dd, 0); make_alias ("cdlog"); - make_generic ("log", GFC_ISYM_LOG); + make_generic ("log", GFC_ISYM_LOG, GFC_STD_F77); - add_sym_1 ("log10", 1, 1, BT_REAL, dr, + add_sym_1 ("log10", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_log10, gfc_resolve_log10, x, BT_REAL, dr, 0); - add_sym_1 ("alog10", 1, 1, BT_REAL, dr, + add_sym_1 ("alog10", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_log10, gfc_resolve_log10, x, BT_REAL, dr, 0); - add_sym_1 ("dlog10", 1, 1, BT_REAL, dd, + add_sym_1 ("dlog10", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_log10, gfc_resolve_log10, x, BT_REAL, dd, 0); - make_generic ("log10", GFC_ISYM_LOG10); + make_generic ("log10", GFC_ISYM_LOG10, GFC_STD_F77); - add_sym_2 ("logical", 0, 1, BT_LOGICAL, dl, + add_sym_2 ("logical", 0, 1, BT_LOGICAL, dl, GFC_STD_F95, gfc_check_logical, gfc_simplify_logical, gfc_resolve_logical, l, BT_LOGICAL, dl, 0, kind, BT_INTEGER, di, 1); - make_generic ("logical", GFC_ISYM_LOGICAL); + make_generic ("logical", GFC_ISYM_LOGICAL, GFC_STD_F95); - add_sym_2 ("matmul", 0, 1, BT_REAL, dr, + add_sym_2 ("matmul", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_matmul, NULL, gfc_resolve_matmul, ma, BT_REAL, dr, 0, mb, BT_REAL, dr, 0); - make_generic ("matmul", GFC_ISYM_MATMUL); + make_generic ("matmul", GFC_ISYM_MATMUL, GFC_STD_F95); /* Note: amax0 is equivalent to real(max), max1 is equivalent to int(max). The max function must take at least two arguments. */ - add_sym_1m ("max", 1, 0, BT_UNKNOWN, 0, + add_sym_1m ("max", 1, 0, BT_UNKNOWN, 0, GFC_STD_F77, gfc_check_min_max, gfc_simplify_max, gfc_resolve_max, a1, BT_UNKNOWN, dr, 0, a2, BT_UNKNOWN, dr, 0); - add_sym_1m ("max0", 1, 0, BT_INTEGER, di, + add_sym_1m ("max0", 1, 0, BT_INTEGER, di, GFC_STD_F77, gfc_check_min_max_integer, gfc_simplify_max, NULL, a1, BT_INTEGER, di, 0, a2, BT_INTEGER, di, 0); - add_sym_1m ("amax0", 1, 0, BT_REAL, dr, + add_sym_1m ("amax0", 1, 0, BT_REAL, dr, GFC_STD_F77, gfc_check_min_max_integer, gfc_simplify_max, NULL, a1, BT_INTEGER, di, 0, a2, BT_INTEGER, di, 0); - add_sym_1m ("amax1", 1, 0, BT_REAL, dr, + add_sym_1m ("amax1", 1, 0, BT_REAL, dr, GFC_STD_F77, gfc_check_min_max_real, gfc_simplify_max, NULL, a1, BT_REAL, dr, 0, a2, BT_REAL, dr, 0); - add_sym_1m ("max1", 1, 0, BT_INTEGER, di, + add_sym_1m ("max1", 1, 0, BT_INTEGER, di, GFC_STD_F77, gfc_check_min_max_real, gfc_simplify_max, NULL, a1, BT_REAL, dr, 0, a2, BT_REAL, dr, 0); - add_sym_1m ("dmax1", 1, 0, BT_REAL, dd, + add_sym_1m ("dmax1", 1, 0, BT_REAL, dd, GFC_STD_F77, gfc_check_min_max_double, gfc_simplify_max, NULL, a1, BT_REAL, dd, 0, a2, BT_REAL, dd, 0); - make_generic ("max", GFC_ISYM_MAX); + make_generic ("max", GFC_ISYM_MAX, GFC_STD_F77); - add_sym_1 ("maxexponent", 0, 1, BT_INTEGER, di, + add_sym_1 ("maxexponent", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_x, gfc_simplify_maxexponent, NULL, x, BT_UNKNOWN, dr, 0); - make_generic ("maxexponent", GFC_ISYM_NONE); + make_generic ("maxexponent", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_3ml ("maxloc", 0, 1, BT_INTEGER, di, + add_sym_3ml ("maxloc", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_minloc_maxloc, NULL, gfc_resolve_maxloc, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1, msk, BT_LOGICAL, dl, 1); - make_generic ("maxloc", GFC_ISYM_MAXLOC); + make_generic ("maxloc", GFC_ISYM_MAXLOC, GFC_STD_F95); - add_sym_3red ("maxval", 0, 1, BT_REAL, dr, + add_sym_3red ("maxval", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_minval_maxval, NULL, gfc_resolve_maxval, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1, msk, BT_LOGICAL, dl, 1); - make_generic ("maxval", GFC_ISYM_MAXVAL); + make_generic ("maxval", GFC_ISYM_MAXVAL, GFC_STD_F95); - add_sym_3 ("merge", 1, 1, BT_REAL, dr, + add_sym_3 ("merge", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_merge, NULL, gfc_resolve_merge, ts, BT_REAL, dr, 0, fs, BT_REAL, dr, 0, msk, BT_LOGICAL, dl, 0); - make_generic ("merge", GFC_ISYM_MERGE); + make_generic ("merge", GFC_ISYM_MERGE, GFC_STD_F95); /* Note: amin0 is equivalent to real(min), min1 is equivalent to int(min). */ - add_sym_1m ("min", 1, 0, BT_UNKNOWN, 0, + add_sym_1m ("min", 1, 0, BT_UNKNOWN, 0, GFC_STD_F77, gfc_check_min_max, gfc_simplify_min, gfc_resolve_min, a1, BT_REAL, dr, 0, a2, BT_REAL, dr, 0); - add_sym_1m ("min0", 1, 0, BT_INTEGER, di, + add_sym_1m ("min0", 1, 0, BT_INTEGER, di, GFC_STD_F77, gfc_check_min_max_integer, gfc_simplify_min, NULL, a1, BT_INTEGER, di, 0, a2, BT_INTEGER, di, 0); - add_sym_1m ("amin0", 1, 0, BT_REAL, dr, + add_sym_1m ("amin0", 1, 0, BT_REAL, dr, GFC_STD_F77, gfc_check_min_max_integer, gfc_simplify_min, NULL, a1, BT_INTEGER, di, 0, a2, BT_INTEGER, di, 0); - add_sym_1m ("amin1", 1, 0, BT_REAL, dr, + add_sym_1m ("amin1", 1, 0, BT_REAL, dr, GFC_STD_F77, gfc_check_min_max_real, gfc_simplify_min, NULL, a1, BT_REAL, dr, 0, a2, BT_REAL, dr, 0); - add_sym_1m ("min1", 1, 0, BT_INTEGER, di, + add_sym_1m ("min1", 1, 0, BT_INTEGER, di, GFC_STD_F77, gfc_check_min_max_real, gfc_simplify_min, NULL, a1, BT_REAL, dr, 0, a2, BT_REAL, dr, 0); - add_sym_1m ("dmin1", 1, 0, BT_REAL, dd, + add_sym_1m ("dmin1", 1, 0, BT_REAL, dd, GFC_STD_F77, gfc_check_min_max_double, gfc_simplify_min, NULL, a1, BT_REAL, dd, 0, a2, BT_REAL, dd, 0); - make_generic ("min", GFC_ISYM_MIN); + make_generic ("min", GFC_ISYM_MIN, GFC_STD_F77); - add_sym_1 ("minexponent", 0, 1, BT_INTEGER, di, + add_sym_1 ("minexponent", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_x, gfc_simplify_minexponent, NULL, x, BT_UNKNOWN, dr, 0); - make_generic ("minexponent", GFC_ISYM_NONE); + make_generic ("minexponent", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_3ml ("minloc", 0, 1, BT_INTEGER, di, + add_sym_3ml ("minloc", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_minloc_maxloc, NULL, gfc_resolve_minloc, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1, msk, BT_LOGICAL, dl, 1); - make_generic ("minloc", GFC_ISYM_MINLOC); + make_generic ("minloc", GFC_ISYM_MINLOC, GFC_STD_F95); - add_sym_3red ("minval", 0, 1, BT_REAL, dr, + add_sym_3red ("minval", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_minval_maxval, NULL, gfc_resolve_minval, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1, msk, BT_LOGICAL, dl, 1); - make_generic ("minval", GFC_ISYM_MINVAL); + make_generic ("minval", GFC_ISYM_MINVAL, GFC_STD_F95); - add_sym_2 ("mod", 1, 1, BT_INTEGER, di, + add_sym_2 ("mod", 1, 1, BT_INTEGER, di, GFC_STD_F77, gfc_check_a_p, gfc_simplify_mod, gfc_resolve_mod, a, BT_INTEGER, di, 0, p, BT_INTEGER, di, 0); - add_sym_2 ("amod", 1, 1, BT_REAL, dr, + add_sym_2 ("amod", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_mod, gfc_resolve_mod, a, BT_REAL, dr, 0, p, BT_REAL, dr, 0); - add_sym_2 ("dmod", 1, 1, BT_REAL, dd, + add_sym_2 ("dmod", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_mod, gfc_resolve_mod, a, BT_REAL, dd, 0, p, BT_REAL, dd, 0); - make_generic ("mod", GFC_ISYM_MOD); + make_generic ("mod", GFC_ISYM_MOD, GFC_STD_F77); - add_sym_2 ("modulo", 1, 1, BT_REAL, di, + add_sym_2 ("modulo", 1, 1, BT_REAL, di, GFC_STD_F95, gfc_check_a_p, gfc_simplify_modulo, gfc_resolve_modulo, a, BT_REAL, di, 0, p, BT_REAL, di, 0); - make_generic ("modulo", GFC_ISYM_MODULO); + make_generic ("modulo", GFC_ISYM_MODULO, GFC_STD_F95); - add_sym_2 ("nearest", 1, 1, BT_REAL, dr, + add_sym_2 ("nearest", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_nearest, gfc_simplify_nearest, gfc_resolve_nearest, x, BT_REAL, dr, 0, s, BT_REAL, dr, 0); - make_generic ("nearest", GFC_ISYM_NEAREST); + make_generic ("nearest", GFC_ISYM_NEAREST, GFC_STD_F95); - add_sym_2 ("nint", 1, 1, BT_INTEGER, di, + add_sym_2 ("nint", 1, 1, BT_INTEGER, di, GFC_STD_F77, gfc_check_a_ikind, gfc_simplify_nint, gfc_resolve_nint, a, BT_REAL, dr, 0, kind, BT_INTEGER, di, 1); - add_sym_1 ("idnint", 1, 1, BT_INTEGER, di, + add_sym_1 ("idnint", 1, 1, BT_INTEGER, di, GFC_STD_F77, gfc_check_idnint, gfc_simplify_idnint, gfc_resolve_idnint, a, BT_REAL, dd, 0); - make_generic ("nint", GFC_ISYM_NINT); + make_generic ("nint", GFC_ISYM_NINT, GFC_STD_F77); - add_sym_1 ("not", 1, 1, BT_INTEGER, di, + add_sym_1 ("not", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_i, gfc_simplify_not, gfc_resolve_not, i, BT_INTEGER, di, 0); - make_generic ("not", GFC_ISYM_NOT); + make_generic ("not", GFC_ISYM_NOT, GFC_STD_F95); - add_sym_1 ("null", 0, 1, BT_INTEGER, di, + add_sym_1 ("null", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_null, gfc_simplify_null, NULL, mo, BT_INTEGER, di, 1); - make_generic ("null", GFC_ISYM_NONE); + make_generic ("null", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_3 ("pack", 0, 1, BT_REAL, dr, + add_sym_3 ("pack", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_pack, NULL, gfc_resolve_pack, ar, BT_REAL, dr, 0, msk, BT_LOGICAL, dl, 0, v, BT_REAL, dr, 1); - make_generic ("pack", GFC_ISYM_PACK); + make_generic ("pack", GFC_ISYM_PACK, GFC_STD_F95); - add_sym_1 ("precision", 0, 1, BT_INTEGER, di, + add_sym_1 ("precision", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_precision, gfc_simplify_precision, NULL, x, BT_UNKNOWN, 0, 0); - make_generic ("precision", GFC_ISYM_NONE); + make_generic ("precision", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_1 ("present", 0, 1, BT_LOGICAL, dl, + add_sym_1 ("present", 0, 1, BT_LOGICAL, dl, GFC_STD_F95, gfc_check_present, NULL, NULL, a, BT_REAL, dr, 0); - make_generic ("present", GFC_ISYM_PRESENT); + make_generic ("present", GFC_ISYM_PRESENT, GFC_STD_F95); - add_sym_3red ("product", 0, 1, BT_REAL, dr, + add_sym_3red ("product", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_product_sum, NULL, gfc_resolve_product, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1, msk, BT_LOGICAL, dl, 1); - make_generic ("product", GFC_ISYM_PRODUCT); + make_generic ("product", GFC_ISYM_PRODUCT, GFC_STD_F95); - add_sym_1 ("radix", 0, 1, BT_INTEGER, di, + add_sym_1 ("radix", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_radix, gfc_simplify_radix, NULL, x, BT_UNKNOWN, 0, 0); - make_generic ("radix", GFC_ISYM_NONE); + make_generic ("radix", GFC_ISYM_NONE, GFC_STD_F95); /* The following function is for G77 compatibility. */ - add_sym_1 ("rand", 0, 1, BT_REAL, 4, + add_sym_1 ("rand", 0, 1, BT_REAL, 4, GFC_STD_GNU, gfc_check_rand, NULL, NULL, i, BT_INTEGER, 4, 1); @@ -1609,237 +1636,239 @@ add_functions (void) PRNG. */ make_alias ("ran"); - make_generic ("rand", GFC_ISYM_RAND); + make_generic ("rand", GFC_ISYM_RAND, GFC_STD_GNU); - add_sym_1 ("range", 0, 1, BT_INTEGER, di, + add_sym_1 ("range", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_range, gfc_simplify_range, NULL, x, BT_REAL, dr, 0); - make_generic ("range", GFC_ISYM_NONE); + make_generic ("range", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_2 ("real", 1, 0, BT_REAL, dr, + add_sym_2 ("real", 1, 0, BT_REAL, dr, GFC_STD_F77, gfc_check_real, gfc_simplify_real, gfc_resolve_real, a, BT_UNKNOWN, dr, 0, kind, BT_INTEGER, di, 1); - add_sym_1 ("float", 1, 0, BT_REAL, dr, + add_sym_1 ("float", 1, 0, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_float, NULL, a, BT_INTEGER, di, 0); - add_sym_1 ("sngl", 1, 0, BT_REAL, dr, + add_sym_1 ("sngl", 1, 0, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_sngl, NULL, a, BT_REAL, dd, 0); - make_generic ("real", GFC_ISYM_REAL); + make_generic ("real", GFC_ISYM_REAL, GFC_STD_F77); - add_sym_2 ("repeat", 0, 1, BT_CHARACTER, dc, + add_sym_2 ("repeat", 0, 1, BT_CHARACTER, dc, GFC_STD_F95, gfc_check_repeat, gfc_simplify_repeat, gfc_resolve_repeat, stg, BT_CHARACTER, dc, 0, n, BT_INTEGER, di, 0); - make_generic ("repeat", GFC_ISYM_REPEAT); + make_generic ("repeat", GFC_ISYM_REPEAT, GFC_STD_F95); - add_sym_4 ("reshape", 0, 1, BT_REAL, dr, + add_sym_4 ("reshape", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_reshape, gfc_simplify_reshape, gfc_resolve_reshape, src, BT_REAL, dr, 0, shp, BT_INTEGER, ii, 0, pad, BT_REAL, dr, 1, ord, BT_INTEGER, ii, 1); - make_generic ("reshape", GFC_ISYM_RESHAPE); + make_generic ("reshape", GFC_ISYM_RESHAPE, GFC_STD_F95); - add_sym_1 ("rrspacing", 1, 1, BT_REAL, dr, + add_sym_1 ("rrspacing", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_x, gfc_simplify_rrspacing, gfc_resolve_rrspacing, x, BT_REAL, dr, 0); - make_generic ("rrspacing", GFC_ISYM_RRSPACING); + make_generic ("rrspacing", GFC_ISYM_RRSPACING, GFC_STD_F95); - add_sym_2 ("scale", 1, 1, BT_REAL, dr, + add_sym_2 ("scale", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_scale, gfc_simplify_scale, gfc_resolve_scale, x, BT_REAL, dr, 0, i, BT_INTEGER, di, 0); - make_generic ("scale", GFC_ISYM_SCALE); + make_generic ("scale", GFC_ISYM_SCALE, GFC_STD_F95); - add_sym_3 ("scan", 1, 1, BT_INTEGER, di, + add_sym_3 ("scan", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_scan, gfc_simplify_scan, gfc_resolve_scan, stg, BT_CHARACTER, dc, 0, set, BT_CHARACTER, dc, 0, bck, BT_LOGICAL, dl, 1); - make_generic ("scan", GFC_ISYM_SCAN); + make_generic ("scan", GFC_ISYM_SCAN, GFC_STD_F95); /* Added for G77 compatibility garbage. */ - add_sym_0 ("second", 0, 1, BT_REAL, 4, NULL, NULL, NULL); + add_sym_0 ("second", 0, 1, BT_REAL, 4, GFC_STD_GNU,NULL, NULL, NULL); - make_generic ("second", GFC_ISYM_SECOND); + make_generic ("second", GFC_ISYM_SECOND, GFC_STD_GNU); - add_sym_1 ("selected_int_kind", 0, 1, BT_INTEGER, di, + add_sym_1 ("selected_int_kind", 0, 1, BT_INTEGER, di, GFC_STD_F95, NULL, gfc_simplify_selected_int_kind, NULL, r, BT_INTEGER, di, 0); - make_generic ("selected_int_kind", GFC_ISYM_SI_KIND); + make_generic ("selected_int_kind", GFC_ISYM_SI_KIND, GFC_STD_F95); - add_sym_2 ("selected_real_kind", 0, 1, BT_INTEGER, di, + add_sym_2 ("selected_real_kind", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_selected_real_kind, gfc_simplify_selected_real_kind, NULL, p, BT_INTEGER, di, 1, r, BT_INTEGER, di, 1); - make_generic ("selected_real_kind", GFC_ISYM_SR_KIND); + make_generic ("selected_real_kind", GFC_ISYM_SR_KIND, GFC_STD_F95); - add_sym_2 ("set_exponent", 1, 1, BT_REAL, dr, + add_sym_2 ("set_exponent", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_set_exponent, gfc_simplify_set_exponent, gfc_resolve_set_exponent, x, BT_REAL, dr, 0, i, BT_INTEGER, di, 0); - make_generic ("set_exponent", GFC_ISYM_SET_EXPONENT); + make_generic ("set_exponent", GFC_ISYM_SET_EXPONENT, GFC_STD_F95); - add_sym_1 ("shape", 0, 1, BT_INTEGER, di, + add_sym_1 ("shape", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_shape, gfc_simplify_shape, gfc_resolve_shape, src, BT_REAL, dr, 0); - make_generic ("shape", GFC_ISYM_SHAPE); + make_generic ("shape", GFC_ISYM_SHAPE, GFC_STD_F95); - add_sym_2 ("sign", 1, 1, BT_REAL, dr, + add_sym_2 ("sign", 1, 1, BT_REAL, dr, GFC_STD_F77, gfc_check_sign, gfc_simplify_sign, gfc_resolve_sign, a, BT_REAL, dr, 0, b, BT_REAL, dr, 0); - add_sym_2 ("isign", 1, 1, BT_INTEGER, di, + add_sym_2 ("isign", 1, 1, BT_INTEGER, di, GFC_STD_F77, NULL, gfc_simplify_sign, gfc_resolve_sign, a, BT_INTEGER, di, 0, b, BT_INTEGER, di, 0); - add_sym_2 ("dsign", 1, 1, BT_REAL, dd, + add_sym_2 ("dsign", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_sign, gfc_resolve_sign, a, BT_REAL, dd, 0, b, BT_REAL, dd, 0); - make_generic ("sign", GFC_ISYM_SIGN); + make_generic ("sign", GFC_ISYM_SIGN, GFC_STD_F77); - add_sym_1 ("sin", 1, 1, BT_REAL, dr, + add_sym_1 ("sin", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_sin, gfc_resolve_sin, x, BT_REAL, dr, 0); - add_sym_1 ("dsin", 1, 1, BT_REAL, dd, + add_sym_1 ("dsin", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_sin, gfc_resolve_sin, x, BT_REAL, dd, 0); - add_sym_1 ("csin", 1, 1, BT_COMPLEX, dz, + add_sym_1 ("csin", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, NULL, gfc_simplify_sin, gfc_resolve_sin, x, BT_COMPLEX, dz, 0); - add_sym_1 ("zsin", 1, 1, BT_COMPLEX, dd, NULL, gfc_simplify_sin, gfc_resolve_sin, x, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("zsin", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, + NULL, gfc_simplify_sin, gfc_resolve_sin, x, BT_COMPLEX, dd, 0); make_alias ("cdsin"); - make_generic ("sin", GFC_ISYM_SIN); + make_generic ("sin", GFC_ISYM_SIN, GFC_STD_F77); - add_sym_1 ("sinh", 1, 1, BT_REAL, dr, + add_sym_1 ("sinh", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_sinh, gfc_resolve_sinh, x, BT_REAL, dr, 0); - add_sym_1 ("dsinh", 1, 1, BT_REAL, dd, + add_sym_1 ("dsinh", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_sinh, gfc_resolve_sinh, x, BT_REAL, dd, 0); - make_generic ("sinh", GFC_ISYM_SINH); + make_generic ("sinh", GFC_ISYM_SINH, GFC_STD_F77); - add_sym_2 ("size", 0, 1, BT_INTEGER, di, + add_sym_2 ("size", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_size, gfc_simplify_size, NULL, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1); - make_generic ("size", GFC_ISYM_SIZE); + make_generic ("size", GFC_ISYM_SIZE, GFC_STD_F95); - add_sym_1 ("spacing", 1, 1, BT_REAL, dr, + add_sym_1 ("spacing", 1, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_x, gfc_simplify_spacing, gfc_resolve_spacing, x, BT_REAL, dr, 0); - make_generic ("spacing", GFC_ISYM_SPACING); + make_generic ("spacing", GFC_ISYM_SPACING, GFC_STD_F95); - add_sym_3 ("spread", 0, 1, BT_REAL, dr, + add_sym_3 ("spread", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_spread, NULL, gfc_resolve_spread, src, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 0, n, BT_INTEGER, di, 0); - make_generic ("spread", GFC_ISYM_SPREAD); + make_generic ("spread", GFC_ISYM_SPREAD, GFC_STD_F95); - add_sym_1 ("sqrt", 1, 1, BT_REAL, dr, + add_sym_1 ("sqrt", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_sqrt, gfc_resolve_sqrt, x, BT_REAL, dr, 0); - add_sym_1 ("dsqrt", 1, 1, BT_REAL, dd, + add_sym_1 ("dsqrt", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_sqrt, gfc_resolve_sqrt, x, BT_REAL, dd, 0); - add_sym_1 ("csqrt", 1, 1, BT_COMPLEX, dz, + add_sym_1 ("csqrt", 1, 1, BT_COMPLEX, dz, GFC_STD_F77, NULL, gfc_simplify_sqrt, gfc_resolve_sqrt, x, BT_COMPLEX, dz, 0); - add_sym_1 ("zsqrt", 1, 1, BT_COMPLEX, dd, NULL, gfc_simplify_sqrt, gfc_resolve_sqrt, x, BT_COMPLEX, dd, 0); /* Extension */ + add_sym_1 ("zsqrt", 1, 1, BT_COMPLEX, dd, GFC_STD_GNU, + NULL, gfc_simplify_sqrt, gfc_resolve_sqrt, x, BT_COMPLEX, dd, 0); make_alias ("cdsqrt"); - make_generic ("sqrt", GFC_ISYM_SQRT); + make_generic ("sqrt", GFC_ISYM_SQRT, GFC_STD_F77); - add_sym_3red ("sum", 0, 1, BT_UNKNOWN, 0, + add_sym_3red ("sum", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_product_sum, NULL, gfc_resolve_sum, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1, msk, BT_LOGICAL, dl, 1); - make_generic ("sum", GFC_ISYM_SUM); + make_generic ("sum", GFC_ISYM_SUM, GFC_STD_F95); - add_sym_1 ("system", 1, 1, BT_INTEGER, di, NULL, NULL, NULL, + add_sym_1 ("system", 1, 1, BT_INTEGER, di, GFC_STD_GNU, NULL, NULL, NULL, c, BT_CHARACTER, dc, 0); - make_generic ("system", GFC_ISYM_SYSTEM); + make_generic ("system", GFC_ISYM_SYSTEM, GFC_STD_GNU); - add_sym_1 ("tan", 1, 1, BT_REAL, dr, + add_sym_1 ("tan", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_tan, gfc_resolve_tan, x, BT_REAL, dr, 0); - add_sym_1 ("dtan", 1, 1, BT_REAL, dd, + add_sym_1 ("dtan", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_tan, gfc_resolve_tan, x, BT_REAL, dd, 0); - make_generic ("tan", GFC_ISYM_TAN); + make_generic ("tan", GFC_ISYM_TAN, GFC_STD_F77); - add_sym_1 ("tanh", 1, 1, BT_REAL, dr, + add_sym_1 ("tanh", 1, 1, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_tanh, gfc_resolve_tanh, x, BT_REAL, dr, 0); - add_sym_1 ("dtanh", 1, 1, BT_REAL, dd, + add_sym_1 ("dtanh", 1, 1, BT_REAL, dd, GFC_STD_F77, NULL, gfc_simplify_tanh, gfc_resolve_tanh, x, BT_REAL, dd, 0); - make_generic ("tanh", GFC_ISYM_TANH); + make_generic ("tanh", GFC_ISYM_TANH, GFC_STD_F77); - add_sym_1 ("tiny", 0, 1, BT_REAL, dr, + add_sym_1 ("tiny", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_x, gfc_simplify_tiny, NULL, x, BT_REAL, dr, 0); - make_generic ("tiny", GFC_ISYM_NONE); + make_generic ("tiny", GFC_ISYM_NONE, GFC_STD_F95); - add_sym_3 ("transfer", 0, 1, BT_REAL, dr, + add_sym_3 ("transfer", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_transfer, NULL, gfc_resolve_transfer, src, BT_REAL, dr, 0, mo, BT_REAL, dr, 0, sz, BT_INTEGER, di, 1); - make_generic ("transfer", GFC_ISYM_TRANSFER); + make_generic ("transfer", GFC_ISYM_TRANSFER, GFC_STD_F95); - add_sym_1 ("transpose", 0, 1, BT_REAL, dr, + add_sym_1 ("transpose", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_transpose, NULL, gfc_resolve_transpose, m, BT_REAL, dr, 0); - make_generic ("transpose", GFC_ISYM_TRANSPOSE); + make_generic ("transpose", GFC_ISYM_TRANSPOSE, GFC_STD_F95); - add_sym_1 ("trim", 0, 1, BT_CHARACTER, dc, + add_sym_1 ("trim", 0, 1, BT_CHARACTER, dc, GFC_STD_F95, gfc_check_trim, gfc_simplify_trim, gfc_resolve_trim, stg, BT_CHARACTER, dc, 0); - make_generic ("trim", GFC_ISYM_TRIM); + make_generic ("trim", GFC_ISYM_TRIM, GFC_STD_F95); - add_sym_2 ("ubound", 0, 1, BT_INTEGER, di, + add_sym_2 ("ubound", 0, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_ubound, gfc_simplify_ubound, gfc_resolve_ubound, ar, BT_REAL, dr, 0, dm, BT_INTEGER, ii, 1); - make_generic ("ubound", GFC_ISYM_UBOUND); + make_generic ("ubound", GFC_ISYM_UBOUND, GFC_STD_F95); - add_sym_3 ("unpack", 0, 1, BT_REAL, dr, + add_sym_3 ("unpack", 0, 1, BT_REAL, dr, GFC_STD_F95, gfc_check_unpack, NULL, gfc_resolve_unpack, v, BT_REAL, dr, 0, msk, BT_LOGICAL, dl, 0, f, BT_REAL, dr, 0); - make_generic ("unpack", GFC_ISYM_UNPACK); + make_generic ("unpack", GFC_ISYM_UNPACK, GFC_STD_F95); - add_sym_3 ("verify", 1, 1, BT_INTEGER, di, + add_sym_3 ("verify", 1, 1, BT_INTEGER, di, GFC_STD_F95, gfc_check_verify, gfc_simplify_verify, gfc_resolve_verify, stg, BT_CHARACTER, dc, 0, set, BT_CHARACTER, dc, 0, bck, BT_LOGICAL, dl, 1); - make_generic ("verify", GFC_ISYM_VERIFY); + make_generic ("verify", GFC_ISYM_VERIFY, GFC_STD_F95); } @@ -1868,55 +1897,55 @@ add_subroutines (void) dc = gfc_default_character_kind; dl = gfc_default_logical_kind; - add_sym_0s ("abort", 1, NULL); + add_sym_0s ("abort", 1, GFC_STD_GNU, NULL); - add_sym_1s ("cpu_time", 0, 1, BT_UNKNOWN, 0, + add_sym_1s ("cpu_time", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_cpu_time, NULL, gfc_resolve_cpu_time, tm, BT_REAL, dr, 0); /* More G77 compatibility garbage. */ - add_sym_1s ("second", 0, 1, BT_UNKNOWN, 0, + add_sym_1s ("second", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, gfc_check_second_sub, NULL, gfc_resolve_second_sub, tm, BT_REAL, dr, 0); - add_sym_4s ("date_and_time", 0, 1, BT_UNKNOWN, 0, + add_sym_4s ("date_and_time", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_date_and_time, NULL, NULL, dt, BT_CHARACTER, dc, 1, tm, BT_CHARACTER, dc, 1, zn, BT_CHARACTER, dc, 1, vl, BT_INTEGER, di, 1); /* More G77 compatibility garbage. */ - add_sym_2s ("etime", 0, 1, BT_UNKNOWN, 0, + add_sym_2s ("etime", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, gfc_check_etime_sub, NULL, gfc_resolve_etime_sub, vl, BT_REAL, 4, 0, tm, BT_REAL, 4, 0); - add_sym_2s ("dtime", 0, 1, BT_UNKNOWN, 0, + add_sym_2s ("dtime", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, gfc_check_etime_sub, NULL, gfc_resolve_etime_sub, vl, BT_REAL, 4, 0, tm, BT_REAL, 4, 0); - add_sym_2s ("getcwd", 0, 1, BT_UNKNOWN, 0, + add_sym_2s ("getcwd", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, gfc_check_getcwd_sub, NULL, gfc_resolve_getcwd_sub, c, BT_CHARACTER, dc, 0, st, BT_INTEGER, di, 1); - add_sym_2s ("getenv", 0, 1, BT_UNKNOWN, 0, + add_sym_2s ("getenv", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, NULL, NULL, NULL, name, BT_CHARACTER, dc, 0, val, BT_CHARACTER, dc, 0); - add_sym_2s ("getarg", 0, 1, BT_UNKNOWN, 0, + add_sym_2s ("getarg", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, NULL, NULL, gfc_resolve_getarg, c, BT_INTEGER, di, 0, vl, BT_CHARACTER, dc, 0); /* F2003 commandline routines. */ - add_sym_3s ("get_command", 0, 1, BT_UNKNOWN, 0, + add_sym_3s ("get_command", 0, 1, BT_UNKNOWN, 0, GFC_STD_F2003, NULL, NULL, gfc_resolve_get_command, com, BT_CHARACTER, dc, 1, length, BT_INTEGER, di, 1, st, BT_INTEGER, di, 1); - add_sym_4s ("get_command_argument", 0, 1, BT_UNKNOWN, 0, + add_sym_4s ("get_command_argument", 0, 1, BT_UNKNOWN, 0, GFC_STD_F2003, NULL, NULL, gfc_resolve_get_command_argument, num, BT_INTEGER, di, 0, val, BT_CHARACTER, dc, 1, @@ -1926,7 +1955,7 @@ add_subroutines (void) /* F2003 subroutine to get environment variables. */ - add_sym_5s ("get_environment_variable", 0, 1, BT_UNKNOWN, 0, + add_sym_5s ("get_environment_variable", 0, 1, BT_UNKNOWN, 0, GFC_STD_F2003, NULL, NULL, gfc_resolve_get_environment_variable, name, BT_CHARACTER, dc, 0, val, BT_CHARACTER, dc, 1, @@ -1935,32 +1964,32 @@ add_subroutines (void) trim_name, BT_LOGICAL, dl, 1); - add_sym_5s ("mvbits", 1, 1, BT_UNKNOWN, 0, + add_sym_5s ("mvbits", 1, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_mvbits, gfc_simplify_mvbits, gfc_resolve_mvbits, f, BT_INTEGER, di, 0, fp, BT_INTEGER, di, 0, ln, BT_INTEGER, di, 0, t, BT_INTEGER, di, 0, tp, BT_INTEGER, di, 0); - add_sym_1s ("random_number", 0, 1, BT_UNKNOWN, 0, + add_sym_1s ("random_number", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_random_number, NULL, gfc_resolve_random_number, h, BT_REAL, dr, 0); - add_sym_3s ("random_seed", 0, 1, BT_UNKNOWN, 0, + add_sym_3s ("random_seed", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_random_seed, NULL, NULL, sz, BT_INTEGER, di, 1, pt, BT_INTEGER, di, 1, gt, BT_INTEGER, di, 1); /* More G77 compatibility garbage. */ - add_sym_1s ("srand", 0, 1, BT_UNKNOWN, di, + add_sym_1s ("srand", 0, 1, BT_UNKNOWN, di, GFC_STD_GNU, gfc_check_srand, NULL, gfc_resolve_srand, c, BT_INTEGER, 4, 0); - add_sym_2s ("system", 0, 1, BT_UNKNOWN, 0, + add_sym_2s ("system", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU, NULL, NULL, gfc_resolve_system_sub, c, BT_CHARACTER, dc, 0, st, BT_INTEGER, di, 1); - add_sym_3s ("system_clock", 0, 1, BT_UNKNOWN, 0, + add_sym_3s ("system_clock", 0, 1, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_system_clock, NULL, gfc_resolve_system_clock, c, BT_INTEGER, di, 1, cr, BT_INTEGER, di, 1, cm, BT_INTEGER, di, 1); @@ -2637,6 +2666,25 @@ gfc_init_expr_extensions (gfc_intrinsic_sym *isym) } +/* Check whether an intrinsic belongs to whatever standard the user + has chosen. */ + +static void +check_intrinsic_standard (const char *name, int standard) +{ + int name_len; + char msgstr[name_len + 53]; + + if (!gfc_option.warn_nonstd_intrinsics) + return; + + name_len = strlen (name); + strncpy (msgstr, name, name_len + 1); + strncat (msgstr, " intrinsic is not included in the selected standard.", 53); + gfc_notify_std (standard, msgstr); +} + + /* See if a function call corresponds to an intrinsic function call. We return: @@ -2746,6 +2794,8 @@ got_specific: } } + check_intrinsic_standard (name, isym->standard); + return MATCH_YES; } @@ -2801,6 +2851,8 @@ gfc_intrinsic_sub_interface (gfc_code * c, int error_flag) return MATCH_ERROR; } + check_intrinsic_standard (name, isym->standard); + return MATCH_YES; fail: diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 845b10de825..2f1824d6dc7 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -126,8 +126,8 @@ by type. Explanations are in the following sections. @gccoptlist{ -fsyntax-only -pedantic -pedantic-errors @gol -w -Wall -Waliasing -Wconversion @gol --Wimplicit-interface -Wsurprising -Wunderflow -Wunused-labels @gol --Wline-truncation @gol +-Wimplicit-interface -Wnonstd-intrinsics -Wsurprising -Wunderflow @gol +-Wunused-labels -Wline-truncation @gol -Werror -W} @item Debugging Options @@ -321,7 +321,8 @@ Inhibit all warning messages. Enables commonly used warning options that which pertain to usage that we recommend avoiding and that we believe is easy to avoid. This currently includes @option{-Wunused-labels}, @option{-Waliasing}, -@option{-Wsurprising} and @option{-Wline-truncation}. +@option{-Wsurprising}, @option{-Wnonstd-intrinsic} and +@option{-Wline-truncation}. @cindex -Waliasing option @@ -352,6 +353,13 @@ Note this only checks that an explicit interface is present. It does not check that the declared interfaces are consistent across program units. +@cindex -Wnonstd-intrinsic option +@cindex options, -Wnonstd-intrinsic +@item -Wnonstd-intrinsic +Warn if the user tries to use an intrinsic that does not belong to the +standard the user has chosen via the -std option. + + @cindex -Wsurprising @cindex options, -Wsurprising @item -Wsurprising diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 6e6912c154b..976a2b436d2 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -53,6 +53,10 @@ Wline-truncation F95 Warn about truncated source lines +Wnonstd-intrinsics +F95 +Warn about usage of non-standard intrinsics + Wsurprising F95 Warn about \"suspicious\" constructs diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 9d33352745d..d1c6841f9f5 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -78,10 +78,12 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED, flag_argument_noalias = 2; gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL | GFC_STD_F2003 | GFC_STD_GNU; + | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_GNU; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL | GFC_STD_F2003; + gfc_option.warn_nonstd_intrinsics = 0; + return CL_F95; } @@ -131,6 +133,7 @@ set_Wall (void) gfc_option.warn_underflow = 1; gfc_option.warn_surprising = 1; gfc_option.warn_unused_labels = 1; + gfc_option.warn_nonstd_intrinsics = 1; set_Wunused (1); warn_return_type = 1; @@ -309,24 +312,27 @@ gfc_handle_option (size_t scode, const char *arg, int value) break; case OPT_std_f95: - gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F2003_OBS - | GFC_STD_F2003_DEL; + gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_identifier_length = 31; break; case OPT_std_f2003: - gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F2003_OBS - | GFC_STD_F2003; - gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2003_OBS; + gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 + | GFC_STD_F2003 | GFC_STD_F95; + gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_identifier_length = 63; break; case OPT_std_gnu: gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL | GFC_STD_F2003 | GFC_STD_GNU; - gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL - | GFC_STD_F2003_OBS | GFC_STD_F2003_DEL; + | GFC_STD_F77 | GFC_STD_F95 | GFC_STD_F2003 + | GFC_STD_GNU; + gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F95_DEL; + break; + + case OPT_Wnonstd_intrinsics: + gfc_option.warn_nonstd_intrinsics = 1; break; } |