This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/50269] New: Wrongly rejects element of assumed-shape array in C_LOC


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

             Bug #: 50269
           Summary: Wrongly rejects element of assumed-shape array in
                    C_LOC
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Reported by Ian Bush in comp.lang.fortran,
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/71338937cf348f26


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



Program gf
   Use iso_c_binding
   Real( c_double ), Dimension( 1:10 ), Target :: a
   Call test( a )
Contains
   Subroutine test( aa )
     Real( c_double ), Dimension( : ), Target :: aa
     Type( c_ptr ), Pointer :: b
     b = c_loc( aa( 1 ) )
   End Subroutine test
End Program gf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]