aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r--gcc/fortran/module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 4db0a3a..089453c 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -6218,6 +6218,17 @@ write_symtree (gfc_symtree *st)
if (check_unique_name (st->name))
return;
+ /* From F2003 onwards, intrinsic procedures are no longer subject to
+ the restriction, "that an elemental intrinsic function here be of
+ type integer or character and each argument must be an initialization
+ expr of type integer or character" is lifted so that intrinsic
+ procedures can be over-ridden. This requires that the intrinsic
+ symbol not appear in the module file, thereby preventing ambiguity
+ when USEd. */
+ if (strcmp (sym->module, "(intrinsic)") == 0
+ && (gfc_option.allow_std & GFC_STD_F2003))
+ return;
+
p = find_pointer (sym);
if (p == NULL)
gfc_internal_error ("write_symtree(): Symbol not written");