public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30888]  New: %VAL construct fails with argument procedures
@ 2007-02-20 17:40 p dot w dot draper at durham dot ac dot uk
  2007-02-20 19:54 ` [Bug fortran/30888] " burnus at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: p dot w dot draper at durham dot ac dot uk @ 2007-02-20 17:40 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-28 18:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-20 17:40 [Bug fortran/30888] New: %VAL construct fails with argument procedures p dot w dot draper at durham dot ac dot uk
2007-02-20 19:54 ` [Bug fortran/30888] " burnus at gcc dot gnu dot org
2007-02-23 16:19 ` burnus at gcc dot gnu dot org
2007-02-28 18:18 ` burnus at gcc dot gnu dot org
2007-02-28 18:27 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).