public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "roger.ferrer at bsc dot es" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52452] New: INTRINSIC cannot be applied to gfortran's ETIME Date: Thu, 01 Mar 2012 15:44:00 -0000 [thread overview] Message-ID: <bug-52452-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52452 Bug #: 52452 Summary: INTRINSIC cannot be applied to gfortran's ETIME Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: roger.ferrer@bsc.es [Note for a possible duplicate: This bug may be related to #52333, but in that one EXTERNAL and explicit INTERFACEs are involved (which is not the case in the current bug).] gfortran's ETIME can be used either as a FUNCTION or as a SUBROUTINE. Explicitly specifying that it is an INTRINSIC name (using an intrinsic-statement) works fine if the function version is used. But when using the subroutine version, gfortran 4.6.2 complains: Consider the following testcase PROGRAM test_etime IMPLICIT NONE INTRINSIC :: etime REAL(4) :: tarray(1:2) REAL(4) :: result CALL etime(tarray, result) END PROGRAM test_etime results in $ gfortran -c test_etime.f90 test_etime.f90:3.22: INTRINSIC :: etime 1 Error: FUNCTION attribute conflicts with SUBROUTINE attribute in 'etime' at (1) Removing that line the compilation succeeds (and gfortran appropiately emits a call to _gfortran_etime_sub). Using the function version works too with or without an INTRINSIC statement. [Note: I'm aware, as the documentation clearly states, that both forms cannot be used in a single program unit. I'm just using one of them at a time] Maybe it is my fault assuming too liberally the meaning of the INTRINSIC statement/attribute. Kind regards,
next reply other threads:[~2012-03-01 15:44 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-01 15:44 roger.ferrer at bsc dot es [this message] 2012-03-01 18:59 ` [Bug fortran/52452] [4.5/4.6/4.7 Regression] " burnus at gcc dot gnu.org 2012-03-02 11:00 ` burnus at gcc dot gnu.org 2012-03-02 15:04 ` [Bug fortran/52452] [4.5/4.6/4.7/4.8 " burnus at gcc dot gnu.org 2012-03-05 16:19 ` [Bug fortran/52452] [4.5/4.6/4.7 " jakub at gcc dot gnu.org 2012-03-06 17:08 ` burnus at gcc dot gnu.org 2012-03-06 17:10 ` burnus at gcc dot gnu.org 2012-03-06 17:37 ` burnus at gcc dot gnu.org 2012-03-22 21:22 ` burnus at gcc dot gnu.org 2012-03-22 21:24 ` [Bug fortran/52452] [4.5/4.6/4.7/4.8 " burnus at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-52452-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).