------- Comment #1 from kargl at gcc dot gnu dot org  2009-12-18 19:39 -------
Your program is non-conforming.  You need to have an explicit interface
for the subroutine with an optional argument.  Put your main program
in one file and the subroutine in another.  When you compile the main
program, how is the compiler suppose to know that the subroutine has
an optional argument?

Try something like the following or use a module.

      program test_error

      interface
        subroutine oc5select_name(dname, report)
          CHARACTER (LEN=*), INTENT(IN)  :: dname
          LOGICAL, OPTIONAL, INTENT(IN)  :: report
        end subroutine oc5select_name
      end interface

c  program to try and regenerate gfortran error
c

      call oc5select_name("AMPLITUDE")
c      call oc5error_test("Error message")
      end


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to