This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30888] New: %VAL construct fails with argument procedures
- From: "p dot w dot draper at durham dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Feb 2007 17:40:35 -0000
- Subject: [Bug fortran/30888] New: %VAL construct fails with argument procedures
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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