diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-04 11:39:46 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-04 11:39:46 +0000 |
commit | a8a6baf6f27b00a35582d666fd2bcf375e4b590f (patch) | |
tree | 95fe84a7cd588da64cb8cea0d251407d2b14864c /gcc/testsuite/gfortran.dg | |
parent | f508ba97e0627d0439bab5da7c5c0505de738303 (diff) | |
download | gcc-a8a6baf6f27b00a35582d666fd2bcf375e4b590f.tar.gz |
* intrinsic.c (add_subroutines): Add ITIME and IDATE.
* intrinsic.h (gfc_check_itime_idate,gfc_resolve_idate,
fc_resolve_itime): New protos.
* iresolve.c (gfc_resolve_itime, gfc_resolve_idate): New functions.
* check.c (gfc_check_itime_idate): New function.
* intrinsic.texi: Document the new intrinsics.
* intrinsics/date_and_time.c (itime0,idate0,itime_i4,itime_i8,
idate_i4,idate_i8): New functions.
* gfortran.dg/itime_idate_1.f: New test.
* gfortran.dg/itime_idate_2.f: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115173 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/itime_idate_1.f | 12 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/itime_idate_2.f | 13 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/itime_idate_1.f b/gcc/testsuite/gfortran.dg/itime_idate_1.f new file mode 100644 index 00000000000..618a83f1769 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/itime_idate_1.f @@ -0,0 +1,12 @@ +! { dg-do run } +! Test for ITIME and IDATE intrinsics + integer x(3) + call itime(x) + if (x(1) < 0 .or. x(1) > 23 .or. + & x(2) < 0 .or. x(2) > 59 .or. + & x(3) < 0 .or. x(3) > 61) call abort + call idate(x) + if (x(1) < 1 .or. x(1) > 31 .or. + & x(2) < 1 .or. x(2) > 12 .or. + & x(3) < 2001 .or. x(3) > 2100) call abort + end diff --git a/gcc/testsuite/gfortran.dg/itime_idate_2.f b/gcc/testsuite/gfortran.dg/itime_idate_2.f new file mode 100644 index 00000000000..11c582dd6ee --- /dev/null +++ b/gcc/testsuite/gfortran.dg/itime_idate_2.f @@ -0,0 +1,13 @@ +! { dg-do run } +! { dg-options "-fdefault-integer-8" } +! Test for ITIME and IDATE intrinsics + integer x(3) + call itime(x) + if (x(1) < 0 .or. x(1) > 23 .or. + & x(2) < 0 .or. x(2) > 59 .or. + & x(3) < 0 .or. x(3) > 61) call abort + call idate(x) + if (x(1) < 1 .or. x(1) > 31 .or. + & x(2) < 1 .or. x(2) > 12 .or. + & x(3) < 2001 .or. x(3) > 2100) call abort + end |