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/30888] New: %VAL construct fails with argument procedures


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


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