public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53945] New: Scalar element of assumed-shape dummy array not recognized as C interoperable
@ 2012-07-12 19:28 townsend at astro dot wisc.edu
  2013-08-27 10:10 ` [Bug fortran/53945] " mikael at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: townsend at astro dot wisc.edu @ 2012-07-12 19:28 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53945
           Summary: Scalar element of assumed-shape dummy array not
                    recognized as C interoperable
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: townsend@astro.wisc.edu


(Reposting from an initial question in comp.lang.fortran):

I'm having trouble getting the following to compile with gfortran 4.7.2:

--SNIP--
program foo

  USE ISO_C_BINDING

  implicit none

contains

  subroutine bar (a)

    real, intent(in), target :: a(:,:)

    type(C_PTR) :: a_ptr

    a_ptr = C_LOC(a(1,1))

  end subroutine bar

end program foo
--SNIP--

The error message is:

Error: Assumed-shape array 'a' at (1) cannot be an argument to the
procedure 'c_loc' because it is not C interoperable

This isn't right; although the array 'a' is not
interoperable because it is assumed-shape (but not allocatable), the
*element* a(1,1) is a scalar and thus should be interoperable.

Looks like the same problem as 50269, in a slightly different context.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/53945] Scalar element of assumed-shape dummy array not recognized as C interoperable
  2012-07-12 19:28 [Bug fortran/53945] New: Scalar element of assumed-shape dummy array not recognized as C interoperable townsend at astro dot wisc.edu
@ 2013-08-27 10:10 ` mikael at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: mikael at gcc dot gnu.org @ 2013-08-27 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mikael at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> ---
Seems to be accepted with trunk (upcoming 4.9.0).
Closing as FIXED.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-27 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 19:28 [Bug fortran/53945] New: Scalar element of assumed-shape dummy array not recognized as C interoperable townsend at astro dot wisc.edu
2013-08-27 10:10 ` [Bug fortran/53945] " mikael at gcc dot gnu.org

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).