aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargls@comcast.net>2004-11-20 01:44:49 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-11-20 01:44:49 +0000
commitd8fe26b2cd7073e13d2a4c8bc0d4f4d310050ce1 (patch)
treeb1ef78f610bfdcc13867c75b1e08219b8aa591c5 /gcc/fortran/intrinsic.c
parent449ecb09b3677aa1d7225862dcc53e6f27b0bad0 (diff)
downloadgcc-d8fe26b2cd7073e13d2a4c8bc0d4f4d310050ce1.zip
gcc-d8fe26b2cd7073e13d2a4c8bc0d4f4d310050ce1.tar.gz
gcc-d8fe26b2cd7073e13d2a4c8bc0d4f4d310050ce1.tar.bz2
check.c (gfc_check_getcwd_sub): Fix seg fault.
* check.c (gfc_check_getcwd_sub): Fix seg fault. * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub, gfc_check_unlink,gfc_check_unlink_sub): New functions * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols * intrinsic.c (add_functions,add_subroutines): Add umask, unlink, exit to intrinsics symbol tables. * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit, gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask, gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub, gfc_resolve_unlink_sub): Add and sort prototypes. * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit, gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols libgfortran/ * Makefile.am: Add intrinsics/{umask.c,unlink.c,exit.c} * Makefile.in: Regenerated * intrinsics/umask.c: New file * intrinsics/unlink.c: ditto * intrinsics/exit.c: ditto From-SVN: r90949
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r--gcc/fortran/intrinsic.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 462d076..9fe36ef 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -1856,6 +1856,20 @@ add_functions (void)
make_generic ("ubound", GFC_ISYM_UBOUND, GFC_STD_F95);
+ /* g77 compatibility for UMASK. */
+ add_sym_1 ("umask", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_umask, NULL, gfc_resolve_umask,
+ a, BT_INTEGER, di, 0);
+
+ make_generic ("umask", GFC_ISYM_UMASK, GFC_STD_GNU);
+
+ /* g77 compatibility for UNLINK. */
+ add_sym_1 ("unlink", 0, 1, BT_INTEGER, di, GFC_STD_GNU,
+ gfc_check_unlink, NULL, gfc_resolve_unlink,
+ a, BT_CHARACTER, dc, 0);
+
+ make_generic ("unlink", GFC_ISYM_UNLINK, GFC_STD_GNU);
+
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,
@@ -1984,6 +1998,10 @@ add_subroutines (void)
gfc_check_srand, NULL, gfc_resolve_srand,
c, BT_INTEGER, 4, 0);
+ add_sym_1s ("exit", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_exit, NULL, gfc_resolve_exit,
+ c, BT_INTEGER, di, 1);
+
add_sym_2s ("system", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
NULL, NULL, gfc_resolve_system_sub,
c, BT_CHARACTER, dc, 0,
@@ -1993,6 +2011,17 @@ add_subroutines (void)
gfc_check_system_clock, NULL, gfc_resolve_system_clock,
c, BT_INTEGER, di, 1, cr, BT_INTEGER, di, 1,
cm, BT_INTEGER, di, 1);
+
+ add_sym_2s ("umask", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_umask_sub, NULL, gfc_resolve_umask_sub,
+ val, BT_INTEGER, di, 0,
+ num, BT_INTEGER, di, 1);
+
+ add_sym_2s ("unlink", 0, 1, BT_UNKNOWN, 0, GFC_STD_GNU,
+ gfc_check_unlink_sub, NULL, gfc_resolve_unlink_sub,
+ c, BT_CHARACTER, dc, 0,
+ st, BT_INTEGER, di, 1);
+
}