OSDN Git Service

PR fortran/14923
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Jun 2004 15:15:41 +0000 (15:15 +0000)
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Jun 2004 15:15:41 +0000 (15:15 +0000)
* intrinsics/date_and_time.c: New file.
* Makefile.am (gfor_helper_src): Add intrinsics/date_and_time.c.
* Makefile.in, aclocal.m4: Regenerate.
* libgfortran.h: Prototype date_and_time().
testsuite/
* gfortran.fortran-torture/execute/date_time_1.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83032 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/execute/date_time_1.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/libgfortran.h

index 733a53c..0e9b731 100644 (file)
@@ -1,5 +1,10 @@
 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
+       PR fortran/14923
+       * gfortran.fortran-torture/execute/date_time_1.f90: New test.
+
+2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
        PR fortran/14957
        * gfortran.fortran-torture/execute/stack_varsize.f90: Correct
         syntax errors in end statements of contained subroutines. 
        PR fortran/14957
        * gfortran.fortran-torture/execute/stack_varsize.f90: Correct
         syntax errors in end statements of contained subroutines. 
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/date_time_1.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/date_time_1.f90
new file mode 100644 (file)
index 0000000..78310c1
--- /dev/null
@@ -0,0 +1,26 @@
+! Check the DATE_AND_TIME intrinsic.
+! Call teh intrinsic with a variety of arguments, but does not check the
+! returned values.
+CHARACTER(8) :: d, d1
+CHARACTER(10) :: t, t1
+CHARACTER(5) :: z, z1
+INTEGER :: v(8), v1(8)
+
+CALL DATE_AND_TIME
+
+CALL DATE_AND_TIME(DATE=d)
+CALL DATE_AND_TIME(TIME=t)
+CALL DATE_AND_TIME(ZONE=z)
+
+CALL DATE_AND_TIME(VALUES=v)
+
+CALL DATE_AND_TIME(DATE=d, TIME=t)
+CALL DATE_AND_TIME(DATE=d, VALUES=v)
+CALL DATE_AND_TIME(TIME=t, ZONE=z)
+
+CALL DATE_AND_TIME(DATE=d, TIME=t, ZONE=z)
+CALL DATE_AND_TIME(TIME=t, ZONE=z, VALUES=v)
+
+CALL DATE_AND_TIME(DATE=d, TIME=t, ZONE=z, VALUES=v)
+
+END
index 3a4e4a8..8cf4131 100644 (file)
@@ -1,3 +1,12 @@
+2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+           Steven Bosscher  <stevenb@suse.de>
+
+       PR fortran/14923
+       * intrinsics/date_and_time.c: New file.
+       * Makefile.am (gfor_helper_src): Add intrinsics/date_and_time.c.
+       * Makefile.in, aclocal.m4: Regenerate.
+       * libgfortran.h: Prototype date_and_time().
+
 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
 
        PR fortran/15665
 2004-06-12  Bud Davis  <bdavis9659@comcast.net>
 
        PR fortran/15665
index f77335d..63bf6b5 100644 (file)
@@ -39,6 +39,7 @@ intrinsics/abort.c \
 intrinsics/args.c \
 intrinsics/cpu_time.c \
 intrinsics/cshift0.c \
 intrinsics/args.c \
 intrinsics/cpu_time.c \
 intrinsics/cshift0.c \
+intrinsics/date_and_time.c \
 intrinsics/eoshift0.c \
 intrinsics/eoshift2.c \
 intrinsics/ishftc.c \
 intrinsics/eoshift0.c \
 intrinsics/eoshift2.c \
 intrinsics/ishftc.c \
index 9401231..f30ae30 100644 (file)
@@ -119,11 +119,11 @@ am__objects_32 = backspace.lo close.lo endfile.lo format.lo inquire.lo \
        list_read.lo lock.lo open.lo read.lo rewind.lo transfer.lo \
        unit.lo unix.lo write.lo
 am__objects_33 = associated.lo abort.lo args.lo cpu_time.lo cshift0.lo \
        list_read.lo lock.lo open.lo read.lo rewind.lo transfer.lo \
        unit.lo unix.lo write.lo
 am__objects_33 = associated.lo abort.lo args.lo cpu_time.lo cshift0.lo \
-       eoshift0.lo eoshift2.lo ishftc.lo pack_generic.lo size.lo \
-       spread_generic.lo string_intrinsics.lo random.lo \
-       reshape_generic.lo reshape_packed.lo selected_kind.lo \
-       system_clock.lo transpose_generic.lo unpack_generic.lo \
-       in_pack_generic.lo in_unpack_generic.lo
+       date_and_time.lo eoshift0.lo eoshift2.lo ishftc.lo \
+       pack_generic.lo size.lo spread_generic.lo string_intrinsics.lo \
+       random.lo reshape_generic.lo reshape_packed.lo \
+       selected_kind.lo system_clock.lo transpose_generic.lo \
+       unpack_generic.lo in_pack_generic.lo in_unpack_generic.lo
 am__objects_34 =
 am__objects_35 = _abs_c4.lo _abs_c8.lo _abs_i4.lo _abs_i8.lo \
        _abs_r4.lo _abs_r8.lo _exp_r4.lo _exp_r8.lo _exp_c4.lo \
 am__objects_34 =
 am__objects_35 = _abs_c4.lo _abs_c8.lo _abs_i4.lo _abs_i8.lo \
        _abs_r4.lo _abs_r8.lo _exp_r4.lo _exp_r8.lo _exp_c4.lo \
@@ -311,6 +311,7 @@ intrinsics/abort.c \
 intrinsics/args.c \
 intrinsics/cpu_time.c \
 intrinsics/cshift0.c \
 intrinsics/args.c \
 intrinsics/cpu_time.c \
 intrinsics/cshift0.c \
+intrinsics/date_and_time.c \
 intrinsics/eoshift0.c \
 intrinsics/eoshift2.c \
 intrinsics/ishftc.c \
 intrinsics/eoshift0.c \
 intrinsics/eoshift2.c \
 intrinsics/ishftc.c \
@@ -2001,6 +2002,15 @@ cshift0.obj: intrinsics/cshift0.c
 cshift0.lo: intrinsics/cshift0.c
        $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0.lo `test -f 'intrinsics/cshift0.c' || echo '$(srcdir)/'`intrinsics/cshift0.c
 
 cshift0.lo: intrinsics/cshift0.c
        $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cshift0.lo `test -f 'intrinsics/cshift0.c' || echo '$(srcdir)/'`intrinsics/cshift0.c
 
+date_and_time.o: intrinsics/date_and_time.c
+       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o date_and_time.o `test -f 'intrinsics/date_and_time.c' || echo '$(srcdir)/'`intrinsics/date_and_time.c
+
+date_and_time.obj: intrinsics/date_and_time.c
+       $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o date_and_time.obj `if test -f 'intrinsics/date_and_time.c'; then $(CYGPATH_W) 'intrinsics/date_and_time.c'; else $(CYGPATH_W) '$(srcdir)/intrinsics/date_and_time.c'; fi`
+
+date_and_time.lo: intrinsics/date_and_time.c
+       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o date_and_time.lo `test -f 'intrinsics/date_and_time.c' || echo '$(srcdir)/'`intrinsics/date_and_time.c
+
 eoshift0.o: intrinsics/eoshift0.c
        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift0.o `test -f 'intrinsics/eoshift0.c' || echo '$(srcdir)/'`intrinsics/eoshift0.c
 
 eoshift0.o: intrinsics/eoshift0.c
        $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o eoshift0.o `test -f 'intrinsics/eoshift0.c' || echo '$(srcdir)/'`intrinsics/eoshift0.c
 
index a4c2759..4eba606 100644 (file)
@@ -390,6 +390,12 @@ void internal_unpack_4 (gfc_array_i4 *, const GFC_INTEGER_4 *);
 #define internal_unpack_8 prefix(internal_unpack_8)
 void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
 
 #define internal_unpack_8 prefix(internal_unpack_8)
 void internal_unpack_8 (gfc_array_i8 *, const GFC_INTEGER_8 *);
 
+/* date_and_time.c */
+
+#define date_and_time prefix(date_and_time)
+void date_and_time (char *, char *, char *, gfc_array_i4 *,
+                   GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4);
+
 /* string_intrinsics.c */
 
 #define compare_string prefix(compare_string)
 /* string_intrinsics.c */
 
 #define compare_string prefix(compare_string)