[Bug fortran/30887] %VAL only accepts default-kind integer/real/complex

2007-02-23 Thread p dot w dot draper at durham dot ac dot uk


--- Comment #7 from p dot w dot draper at durham dot ac dot uk  2007-02-23 
15:44 ---
Tried out the patch and it works for me under 64bit with
default sized integers. Seems to have fixed PR 30888 too.

Thanks.


-- 


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



[Bug fortran/30888] New: %VAL construct fails with argument procedures

2007-02-20 Thread p dot w dot draper at durham dot ac dot uk
When calling procedures which are passed as arguments to
a subroutine the %VAL construct has inconsistent behaviour.
Consider the following code:

  SUBROUTINE VALTEST( DOIT )
  EXTERNAL DOIT
  INTEGER P
  INTEGER I
  I = 0
  P = 0
  CALL DOIT( %VAL( P ) )
  CALL DOIT( I )
  CALL DOIT( %VAL( P ) )
  END

> gfortran -c valtest.f 
valtest.f:9.22:

  CALL DOIT( %VAL( P ) )
 1
Error: By-value argument at (1) is not allowed in this context

which is an error caused by the second identical call to DOIT(%VAL(P)).


-- 
   Summary: %VAL construct fails with argument procedures
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  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=30888



[Bug fortran/30887] New: %VAL construct fails on 64 bit

2007-02-20 Thread p dot w dot draper at durham dot ac dot uk
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



[Bug fortran/23074] g77-style typeless BOZ constants not implemented

2005-07-26 Thread p dot w dot draper at durham dot ac dot uk

--- Additional Comments From p dot w dot draper at durham dot ac dot uk  
2005-07-26 13:28 ---
Andrew, I've said this is related to bug 18026, rather than a duplicate, as the
actual format used for these typeless BOZ constants is none standard and not
the same as in bug 18026.

As in gfortran, g77 typed constants have the format X'', whereas these are
''X, the difference may not be apparent at first glance. If you missed this
point please reopen or merge this report.

-- 


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


[Bug fortran/23074] New: g77-style typeless BOZ constants not implemented

2005-07-26 Thread p dot w dot draper at durham dot ac dot uk
In g77 you define a typeless BOZ constant that can be assigned to any other
type, using the formats ''X, ''Z etc. This allows PARAMETERs to be 
defined like:

  PROGRAM TLBOZ
  DOUBLE PRECISION inf, nan
  PARAMETER ( inf = '7FF0'Z )
  PARAMETER ( nan = 'FFF8'X )
  print *, inf, nan
  END

The relevant g77 description is at:
 
  http://gcc.gnu.org/onlinedocs/gcc-3.4.1/g77/Constants.html

This is related to bug 18026.

-- 
   Summary: g77-style typeless BOZ constants not implemented
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P2
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: p dot w dot draper at durham dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-redhat-linux


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


[Bug fortran/23064] New: %LOC construct not implemented

2005-07-25 Thread p dot w dot draper at durham dot ac dot uk
The %LOC construct returns the memory address of a storage item. It is used for
interoperability with other languages.

This feature is present in g77:

http://gcc.gnu.org/onlinedocs/gcc-3.4.4/g77/_0025LOC_0028_0029.html#g_t_0025LOC_0028_0029

-- 
   Summary: %LOC construct not implemented
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P2
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: p dot w dot draper at durham dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-redhat-linux


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


[Bug fortran/23063] New: %LOC construct not implemented

2005-07-25 Thread p dot w dot draper at durham dot ac dot uk
The %LOC construct returns the memory address of a storage item. It is used for
interoperability with other languages.

This feature is present in g77:

http://gcc.gnu.org/onlinedocs/gcc-3.4.4/g77/_0025LOC_0028_0029.html#g_t_0025LOC_0028_0029

-- 
   Summary: %LOC construct not implemented
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P2
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: p dot w dot draper at durham dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-redhat-linux


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


[Bug fortran/23062] New: %VAL construct not implemented

2005-07-25 Thread p dot w dot draper at durham dot ac dot uk
The %VAL construct is used for passing arguments by value, rather than the 
usual by reference or descriptor. It is vital for interoperability with other
languages such as C.

This feature is available in g77:

http://gcc.gnu.org/onlinedocs/gcc-3.4.4/g77/_0025VAL_0028_0029.html#_0025VAL_0028_0029

My interest in this feature comes from the world of astronomy where we have
a large legacy code base (~1 Million SLOC) written in Fortran 77, (see
http://cvsweb.starlink.ac.uk) where this feature is used for efficiently
accessing large data arrays using mmap, complex data structures, and for
accessing dynamic memory.

-- 
   Summary: %VAL construct not implemented
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: p dot w dot draper at durham dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-redhat-linux


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


[Bug fortran/23060] New: %VAL construct not implemented

2005-07-25 Thread p dot w dot draper at durham dot ac dot uk
The %VAL construct is used for passing arguments by value, rather than the 
usual by reference or descriptor. It is vital for interoperability with other
languages such as C.

This feature is available in g77:

http://gcc.gnu.org/onlinedocs/gcc-3.4.4/g77/_0025VAL_0028_0029.html#_0025VAL_0028_0029

My interest in this feature comes from the world of astronomy where we have
a large legacy code base (~1 Million SLOC) written in Fortran 77, (see
http://cvsweb.starlink.ac.uk) where this feature is used for efficiently
accessing large data arrays using mmap, complex data structures, and for
accessing dynamic memory.

-- 
   Summary: %VAL construct not implemented
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: p dot w dot draper at durham dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i386-redhat-linux


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