Nvfortran-s-0155

Hi,
nvfortran (22.11-0 64-bit) gives error NVFORTRAN-S-0155-Passed object dummy argument 'this' in type bound procedure 'get_val' of type 'typ_test' must be declared with data type 'typ_test' (main.f90: 26) for the following minimal example.

MODULE mod_test

   IMPLICIT NONE
   PRIVATE

   TYPE, PUBLIC :: typ_test(k)
      INTEGER, KIND  :: k
      REAL(KIND = k) :: val
   CONTAINS
      PROCEDURE, PASS(this), PRIVATE :: get_val
      GENERIC              , PUBLIC  :: get => get_val
   END TYPE typ_test

CONTAINS

   PURE FUNCTION get_val(this) RESULT(val)

      IMPLICIT NONE
      CLASS(typ_test(8)), INTENT(IN) :: this
      REAL(kind=8)                   :: val

      val = this%val

   END FUNCTION get_val

END MODULE mod_test



PROGRAM prg_test

   USE mod_test
   IMPLICIT NONE

END PROGRAM prg_test

I am not sure if “generic” is supported by the compiler or if it is possibly a bug.

Thanks

Ali

Thanks for the report Ali. I talked with engineering and they believe that it’s a bug so I filed problem report TPR #32746.

-Mat

1 Like

Thanks Mat.

Hi Ali,

Apologies for the late notification, but I wanted to let you know that TPR#32746 was fixed in our 23.1 release.

% nvfortran -V22.11 test.f90
NVFORTRAN-S-0155-Passed object dummy argument 'this' in type bound procedure 'get_val' of type 'typ_test' must be declared with data type 'typ_test'  (test.f90: 26)
% nvfortran -V23.1 test.f90
%

-Mat

1 Like

Thanks Mat, I recognized that this issue is solved. I have forgotten to write it here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.