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/30887] New: %VAL construct fails on 64 bit


The %VAL construct doesn't accept INTEGER types with a size
greater than the default kind. This is essential for supporting
64 bit architectures where an address cannot be stored in 
an integer with the default kind. Consider the simple module:

      SUBROUTINE VALTEST2()
      INTEGER*8 P
      P = 0
      CALL DOIT( %VAL( P ) )
      END

That fails with error report:

> gfortran -c valtest2.f 
valtest2.f:6.22:

      CALL DOIT( %VAL( P ) )                                            
                     1
Error: Kind of by-value argument at (1) is larger than default kind

Increasing the size of the default integer kind would resolve this
problem, but that would have secondary issues (which are not
acceptable in my code, the default integer maps to a defined-size
storage type).


-- 
           Summary: %VAL construct fails on 64 bit
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: p dot w dot draper at durham dot ac dot uk
  GCC host triplet: x86_64-unknown-linux-gnu


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


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