https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88286

            Bug ID: 88286
           Summary: gfortran reports conflicting intent(in) with an
                    intent(in) declared class variable
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aluaces at udc dot es
  Target Milestone: ---

I get the error

test_bug.f90:19:16:

     INTENT(IN) b
                1
Error: INTENT (IN) conflicts with INTENT(IN) at (1)

with the attached minimal working example.  The error is issued at the last
function, but it is not triggered if I remove either the first or the second.

If the parameter "b" is not a CLASS reference but a base type, the test passes
as well, so I think it has to be something regarding polymorphic types.

MODULE MOD_BUG
  IMPLICIT NONE

  TYPE BT
     INTEGER I
  END TYPE BT

CONTAINS

  FUNCTION si_p_loc(b)
    CLASS(BT)::b
    LOGICAL si_p_loc
    INTENT(IN) b
  END FUNCTION si_p_loc

  FUNCTION si_v_loc(b)
    CLASS(BT)::b
    LOGICAL si_v_loc
    INTENT(IN) b
  END FUNCTION si_v_loc

END MODULE MOD_BUG

Reply via email to