summaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-06 10:17:04 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-06 10:17:04 +0000
commitb902b078afae521ac279fd37672fe31f07198686 (patch)
tree2bf68231c09bf20e0ef20f8acec4df3d8c11c85c /gcc/fortran/trans-decl.c
parentad2c8cf6a9f51de8bfa3bb0a13a958413e5e5ae1 (diff)
downloadgcc-b902b078afae521ac279fd37672fe31f07198686.tar.gz
* intrinsic.c (add_functions): Add ctime and fdate intrinsics.
(add_subroutines): Likewise. * intrinsic.h: Prototypes for gfc_check_ctime, gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime, gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub. * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE. * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions. * trans-decl.c (gfc_build_intrinsic_function_decls): Add gfor_fndecl_fdate and gfor_fndecl_ctime. * check.c (gfc_check_ctime, gfc_check_ctime_sub, gfc_check_fdate_sub): New functions. * trans-intrinsic.c (gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate): New functions. (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME and GFC_ISYM_FDATE. * intrinsic.texi: Documentation for the new CTIME and FDATE intrinsics. * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate. * intrinsics/ctime.c: New file. * configure.ac: Add check for ctime. * Makefile.am: Add ctime.c * configure: Regenerate. * config.h.in: Regenerate. * Makefile.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106558 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index b44cd8fbf17..9d71d7143bc 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -87,6 +87,8 @@ tree gfor_fndecl_select_string;
tree gfor_fndecl_runtime_error;
tree gfor_fndecl_set_fpe;
tree gfor_fndecl_set_std;
+tree gfor_fndecl_ctime;
+tree gfor_fndecl_fdate;
tree gfor_fndecl_ttynam;
tree gfor_fndecl_in_pack;
tree gfor_fndecl_in_unpack;
@@ -1859,6 +1861,21 @@ gfc_build_intrinsic_function_decls (void)
gfc_charlen_type_node,
gfc_c_int_type_node);
+ gfor_fndecl_fdate =
+ gfc_build_library_function_decl (get_identifier (PREFIX("fdate")),
+ void_type_node,
+ 2,
+ pchar_type_node,
+ gfc_charlen_type_node);
+
+ gfor_fndecl_ctime =
+ gfc_build_library_function_decl (get_identifier (PREFIX("ctime")),
+ void_type_node,
+ 3,
+ pchar_type_node,
+ gfc_charlen_type_node,
+ gfc_int8_type_node);
+
gfor_fndecl_adjustl =
gfc_build_library_function_decl (get_identifier (PREFIX("adjustl")),
void_type_node,