[Bug fortran/47034] New: TRANSFER of C_PTR: Components of structure constructor are PRIVATE

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 21 21:37:00 GMT 2010


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

           Summary: TRANSFER of C_PTR: Components of structure constructor
                    are PRIVATE
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/05c3648efda0dc9b#
- and especially
http://groups.google.com/group/comp.lang.fortran/msg/7e9e61c22a76f683

James Van Buskirk reports that

   use ISO_C_BINDING 
   type(C_PTR), parameter :: p1 = &
      transfer(32512_C_INTPTR_T,C_NULL_PTR)
   integer(C_INTPTR_T), parameter :: n1 = transfer(p1,0_C_INTPTR_T) 

fails with:

   integer(C_INTPTR_T), parameter :: n1 = transfer(p1,0_C_INTPTR_T)
                                                   1
Error: Components of structure constructor 'c_ptr' at (1) are PRIVATE

The error is questionable as the first line works w/o error - and as there is
no structure constructor involved at all. While the internals are private,
TRANSFER usually does not care about this.



More information about the Gcc-bugs mailing list