It might by that gfortran wrongly rejects the following program. Or it might be
that it is invalid. This PR is mostly about checking whether the program is
valid. It can be found at:

http://groups.google.com/group/comp.lang.fortran/msg/077a30ae15edd3cc



Compiling only the MODULE - with [ ] replaced by (/ /):

- It complies with: ifort 9.1, openf95, g95

- Sunf95:
  "call C(qsub, 2)": ERROR: The type of the actual argument, "LOGICAL", does
                     not match "INTEGER", the type of the dummy argument.
- Lahey: column 18: In the reference to procedure 'C', the type of actual
argument must be the same as that of the corresponding dummy argument.

- NAG f95, gfortran: "Type/rank mismatch", respectively
  Error: line 16: Scalar supplied for array argument SUB (no. 1) of B
  Error: line 19: Incorrect data type for argument SUB (no. 1) of C


Compiling the whole program:
- Works with g95 and openf95
- Fails with ifort: line 97: The shape matching rules of actual arguments and
dummy arguments have been violated.   [SUBB]


Compiling the whole program, but with "call C" commented out in "callthru":
- Works with sunf95 and Lahey.


Thus:
- Is "call C" correct or not?
- Is "call B" correct or not?
- Is "call B" in the module valid, but "call callthru(subB,n)" is not?


-- 
           Summary: Possibly rejects valid problem with dummy procedure
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to