public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/38220]  New: C_LOC intrinsic non-pure and without explicit interface
Date: Fri, 21 Nov 2008 22:03:00 -0000	[thread overview]
Message-ID: <bug-38220-13648@http.gcc.gnu.org/bugzilla/> (raw)

$> cat cloc.f90
USE ISO_C_BINDING, ONLY: C_PTR, C_LOC
CONTAINS
  PURE SUBROUTINE F(x)
    INTEGER, INTENT(in), TARGET :: x
    TYPE(C_PTR) :: px
    px = C_LOC(x)
  END SUBROUTINE
END

$> gfortran-svn -Wimplicit-interface cloc.f90
cloc.f90:6.9:

    px = C_LOC(x)
        1
Warning: Procedure 'c_loc' called with an implicit interface at (1)
cloc.f90:6.9:

    px = C_LOC(x)
        1
Error: Function reference to 'c_loc' at (1) is to a non-PURE procedure within a
PURE procedure

$> gfortran-svn --version
GNU Fortran (GCC) 4.4.0 20081120 (experimental)


To my knowledge, all intrinsics have an explicit interface and are PURE by
default?!


-- 
           Summary: C_LOC intrinsic non-pure and without explicit interface
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dfranke at gcc dot gnu dot org
OtherBugsDependingO 20585,32630
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38220


             reply	other threads:[~2008-11-21 22:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 22:03 dfranke at gcc dot gnu dot org [this message]
2008-12-09 20:31 ` [Bug fortran/38220] " dfranke at gcc dot gnu dot org
2008-12-09 20:51 ` dfranke at gcc dot gnu dot org
2009-01-06 13:06 ` tkoenig at gcc dot gnu dot org
2009-01-06 23:03 ` tkoenig at gcc dot gnu dot org
2009-01-06 23:05 ` tkoenig at gcc dot gnu dot 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-38220-13648@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: link
Be 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).