public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32804]  New: ISO C Binding: C_LOC argument checking needs improvement
@ 2007-07-18  7:47 burnus at gcc dot gnu dot org
  2007-07-19  8:31 ` [Bug fortran/32804] " burnus at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-18  7:47 UTC (permalink / raw)
  To: gcc-bugs

subroutine aaa(in)
      use iso_c_binding
      implicit none
      CHARACTER(KIND=C_CHAR), DIMENSION(*), TARGET  :: in
      type(c_ptr) :: cptr
      cptr = c_loc(in)
      end subroutine

Wrongly rejected with:
  Error: CHARACTER argument 'in' to 'c_loc' at (1) must have a length of 1

      subroutine aaa(in)
      use iso_c_binding
      implicit none
      integer(KIND=C_int), DIMENSION(:), TARGET  :: in
      type(c_ptr) :: cptr
      cptr = c_loc(in)
      end subroutine

Wrongly accepts this; NAG f95 writes:

Error: aa.f90, line 6: The argument to C_LOC must not be an assumed-shape array


-- 
           Summary: ISO C Binding: C_LOC argument checking needs improvement
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, accepts-invalid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 32630
             nThis:


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


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

end of thread, other threads:[~2007-07-21 20:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-18  7:47 [Bug fortran/32804] New: ISO C Binding: C_LOC argument checking needs improvement burnus at gcc dot gnu dot org
2007-07-19  8:31 ` [Bug fortran/32804] " burnus at gcc dot gnu dot org
2007-07-19 19:15 ` patchapp at dberlin dot org
2007-07-21 20:31 ` kargl at gcc dot gnu dot org
2007-07-21 20:37 ` kargl at gcc dot gnu dot 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).