diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2014-06-15 16:58:53 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2014-06-15 16:58:53 +0000 |
commit | a416c4c766df05b1e85dcee2fe7857e9a6e87b88 (patch) | |
tree | d08324947894c4c45c1d88bc91e42afa45a1acd2 /gcc/fortran/trans-decl.c | |
parent | 6faf47517f3a989140af3d054c75718bfcc20581 (diff) | |
download | gcc-a416c4c766df05b1e85dcee2fe7857e9a6e87b88.zip gcc-a416c4c766df05b1e85dcee2fe7857e9a6e87b88.tar.gz gcc-a416c4c766df05b1e85dcee2fe7857e9a6e87b88.tar.bz2 |
re PR fortran/28484 ([F03] system_clock with real-type count_rate does not compile)
PR fortran/28484
PR fortran/61429
* check.c (gfc_check_system_clock): Improve checking of arguments.
* intrinsic.texi: Update doc of SYSTEM_CLOCK.
* iresolve.c (gfc_resolve_system_clock): Choose library function
used depending on argument kinds.
* trans-decl.c (gfc_build_intrinsic_function_decls): Build
decls for system_clock_4 and system_clock_8.
* trans-intrinsic.c (conv_intrinsic_system_clock): New function.
(gfc_conv_intrinsic_subroutine): Call conv_intrinsic_system_clock.
* trans.h (gfor_fndecl_system_clock4, gfor_fndecl_system_clock8):
New variables.
* gfortran.dg/system_clock_1.f90: New file.
* gfortran.dg/system_clock_2.f90: New file.
From-SVN: r211686
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 863e596..1940622 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -116,6 +116,8 @@ tree gfor_fndecl_ttynam; tree gfor_fndecl_in_pack; tree gfor_fndecl_in_unpack; tree gfor_fndecl_associated; +tree gfor_fndecl_system_clock4; +tree gfor_fndecl_system_clock8; /* Coarray run-time library function decls. */ @@ -2822,7 +2824,9 @@ static void gfc_build_intrinsic_function_decls (void) { tree gfc_int4_type_node = gfc_get_int_type (4); + tree gfc_pint4_type_node = build_pointer_type (gfc_int4_type_node); tree gfc_int8_type_node = gfc_get_int_type (8); + tree gfc_pint8_type_node = build_pointer_type (gfc_int8_type_node); tree gfc_int16_type_node = gfc_get_int_type (16); tree gfc_logical4_type_node = gfc_get_logical_type (4); tree pchar1_type_node = gfc_get_pchar_type (1); @@ -3021,6 +3025,16 @@ gfc_build_intrinsic_function_decls (void) DECL_PURE_P (gfor_fndecl_sr_kind) = 1; TREE_NOTHROW (gfor_fndecl_sr_kind) = 1; + gfor_fndecl_system_clock4 = gfc_build_library_function_decl ( + get_identifier (PREFIX("system_clock_4")), + void_type_node, 3, gfc_pint4_type_node, gfc_pint4_type_node, + gfc_pint4_type_node); + + gfor_fndecl_system_clock8 = gfc_build_library_function_decl ( + get_identifier (PREFIX("system_clock_8")), + void_type_node, 3, gfc_pint8_type_node, gfc_pint8_type_node, + gfc_pint8_type_node); + /* Power functions. */ { tree ctype, rtype, itype, jtype; |