intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG, LSTAT, MCLOCK and MCLOCK8...
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 26 Jul 2006 11:58:48 +0000 (11:58 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Wed, 26 Jul 2006 11:58:48 +0000 (11:58 +0000)
commitbf3fb7e43c8d1f22edda0c427a2ac194e8db104b
treec7642810eb626a8e434832e2f5f5bee64e4bbc84
parent0fb2088c6a08cf849bda7138603045b2f6d8869b
intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG, LSTAT, MCLOCK and MCLOCK8 intrinsic functions.

* intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG,
LSTAT, MCLOCK and MCLOCK8 intrinsic functions.
(add_subroutines): Add LSTAT intrinsic subroutine.
* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_INT2,
GFC_ISYM_INT8, GFC_ISYM_LONG, GFC_ISYM_LSTAT, GFC_ISYM_MCLOCK
and GFC_ISYM_MCLOCK8.
* iresolve.c (gfc_resolve_int2, gfc_resolve_int8,
gfc_resolve_long, gfc_resolve_lstat, gfc_resolve_mclock,
gfc_resolve_mclock8, gfc_resolve_lstat_sub): New functions.
* check.c (gfc_check_intconv): New function.
* trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
the added GFC_ISYM_*.
* simplify.c (gfc_simplify_intconv, gfc_simplify_int2,
gfc_simplify_int8, gfc_simplify_long): New functions.
* intrinsic.h (gfc_check_intconv, gfc_simplify_int2,
gfc_simplify_int8, gfc_simplify_long, gfc_resolve_int2,
gfc_resolve_int8, gfc_resolve_long, gfc_resolve_lstat,
gfc_resolve_mclock, gfc_resolve_mclock8, gfc_resolve_lstat_sub):
Add prototypes.

* gfortran.dg/mclock.f90: New test.
* gfortran.dg/int_conv_1.f90: New test.
* gfortran.dg/stat_1.f90: New test.
* gfortran.dg/stat_2.f90: New test.

* configure.ac: Check for function clock.
* Makefile.am: Compile new file intrinsics/clock.c.
* intrinsics/clock.c: New file.
* Makefile.in: Regenerate.
* configure: Regenerate.
* config.h.in: Regenerate.
* intrinsics/stat.c: Rename the old stat_i?_sub functions to
helper functions stat_i?_sub_0, and use them for both STAT and
LSTAT.

From-SVN: r115754
21 files changed:
gcc/fortran/ChangeLog
gcc/fortran/check.c
gcc/fortran/gfortran.h
gcc/fortran/intrinsic.c
gcc/fortran/intrinsic.h
gcc/fortran/iresolve.c
gcc/fortran/simplify.c
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/int_conv_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/mclock.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/stat_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/stat_2.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/config.h.in
libgfortran/configure
libgfortran/configure.ac
libgfortran/intrinsics/clock.c [new file with mode: 0644]
libgfortran/intrinsics/stat.c