From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9785 invoked by alias); 18 Jul 2007 07:47:54 -0000 Received: (qmail 9749 invoked by uid 48); 18 Jul 2007 07:47:45 -0000 Date: Wed, 18 Jul 2007 07:47:00 -0000 Subject: [Bug fortran/32804] New: ISO C Binding: C_LOC argument checking needs improvement X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01902.txt.bz2 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