Bug 14994 - Secnds Intrinsic not support (or any VMS intrinsics)
Summary: Secnds Intrinsic not support (or any VMS intrinsics)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: tree-ssa
: P2 enhancement
Target Milestone: 4.0.3
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks: 19292
  Show dependency treegraph
 
Reported: 2004-04-17 15:56 UTC by Andrew Pinski
Modified: 2005-11-10 02:44 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-09-18 05:09:21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2004-04-17 15:56:41 UTC
<http://gcc.gnu.org/onlinedocs/g77/Secnds-Intrinsic.html>.  Another one from this 
person's code.

        program fmain
        implicit none
        integer time1
        time1= secnds(0.0)
        end
Comment 1 Andrew Pinski 2004-04-26 13:08:25 UTC
Confirmed.
Comment 2 Tobias Schlüter 2004-05-14 14:55:16 UTC
Same comment as for PR 14993: what does secnds do precisely?
Comment 3 Andrew Pinski 2004-05-14 14:58:13 UTC
Well in this case I gave a link to g77's docs for what this intrinsic does.

Secnds Intrinsic
     Secnds(T)
Secnds: REAL(KIND=1) function.
T: REAL(KIND=1); scalar; INTENT(IN).
Intrinsic groups: vxt.
Description:
Returns the local time in seconds since midnight minus the value T.
This values returned by this intrinsic become numerically less than previous values (they wrap around) 
during a single run of the compiler program, under normal circumstances (such as running through the 
midnight hour).
Comment 4 Tobias Schlüter 2004-05-16 20:19:55 UTC
(In reply to comment #3)
> Well in this case I gave a link to g77's docs for what this intrinsic does.

Sorry, I had missed that.
Comment 5 Paul Thomas 2005-11-01 05:53:35 UTC
Subject: Bug 14994

Author: pault
Date: Tue Nov  1 05:53:29 2005
New Revision: 106317

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106317
Log:
2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/21565
	* symbol.c (check_conflict): An object cannot be in a namelist and in
	block data.

	PR fortran/18737
	* resolve.c (resolve_symbol): Set the error flag to
	gfc_set_default_type, in the case of an external symbol, so that
	an error message is emitted if IMPLICIT NONE is set.

	PR fortran/14994
	* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
	* check.c (gfc_check_secnds): New function.
	* intrinsic.c (add_functions): Add call to secnds.
	* iresolve.c (gfc_resolve_secnds): New function.
	* trans-intrinsic (gfc_conv_intrinsic_function): Add call to
	secnds via case GFC_ISYM_SECNDS.
	* intrinsic.texi: Add documentation for secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/14994
	* libgfortran/intrinsics/date_and_time.c: Add interface to
	the functions date_and_time for the intrinsic function secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/21565
	gfortran.dg/namelist_blockdata.f90: New test.

	PR fortran/18737
	gfortran.dg/external_implicit_none.f90: New test.

	PR fortran/14994
	* gfortran.dg/secnds.f: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/external_implicit_none.f90
    trunk/gcc/testsuite/gfortran.dg/namelist_blockdata.f
    trunk/gcc/testsuite/gfortran.dg/secnds.f
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/intrinsics/date_and_time.c

Comment 6 Paul Thomas 2005-11-01 12:15:26 UTC
Subject: Bug 14994

Author: pault
Date: Tue Nov  1 12:15:07 2005
New Revision: 106326

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106326
Log:
2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/21565
	* symbol.c (check_conflict): An object cannot be in a namelist and in
	block data.

	PR fortran/18737
	* resolve.c (resolve_symbol): Set the error flag to
	gfc_set_default_type, in the case of an external symbol, so that
	an error message is emitted if IMPLICIT NONE is set.

	PR fortran/14994
	* gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
	* check.c (gfc_check_secnds): New function.
	* intrinsic.c (add_functions): Add call to secnds.
	* iresolve.c (gfc_resolve_secnds): New function.
	* trans-intrinsic (gfc_conv_intrinsic_function): Add call to
	secnds via case GFC_ISYM_SECNDS.
	* intrinsic.texi: Add documentation for secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/14994
	* libgfortran/intrinsics/date_and_time.c: Add interface to
	the functions date_and_time for the intrinsic function secnds.

2005-11-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/21565
	gfortran.dg/namelist_blockdata.f90: New test.

	PR fortran/18737
	gfortran.dg/external_implicit_none.f90: New test.

	PR fortran/14994
	* gfortran.dg/secnds.f: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/external_implicit_none.f90
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/namelist_blockdata.f
    branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/secnds.f
Modified:
    branches/gcc-4_0-branch/gcc/fortran/ChangeLog
    branches/gcc-4_0-branch/gcc/fortran/check.c
    branches/gcc-4_0-branch/gcc/fortran/gfortran.h
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.c
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.h
    branches/gcc-4_0-branch/gcc/fortran/intrinsic.texi
    branches/gcc-4_0-branch/gcc/fortran/iresolve.c
    branches/gcc-4_0-branch/gcc/fortran/resolve.c
    branches/gcc-4_0-branch/gcc/fortran/symbol.c
    branches/gcc-4_0-branch/gcc/fortran/trans-intrinsic.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/libgfortran/ChangeLog
    branches/gcc-4_0-branch/libgfortran/intrinsics/date_and_time.c

Comment 7 Paul Thomas 2005-11-01 13:03:23 UTC
Fixed on mainline and 4.0