IBM Support

IV85623: 'INVALID COMPONENT NAME' ERROR WHEN ACCESSING GRANDPARENT PROCEDURE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When accessing a procedure two type-levels away from a
    grandchild type, an invalid error message is output.
    
    
    
       === TEST CASE ===
    
    module A
    implicit none
    private
    type :: A_t
       contains
         procedure :: set => set_A
         end type
    public:: A_t
    contains
      subroutine set_A(this)
        class(A_t), intent(inout) :: this
        write(*,*) 'Set from A'
        end subroutine set_A
    end module A
    
    module B
    USE A
    implicit none
    private                          ! REMOVING 'private' WORKS
    type, extends(A_t) :: B_t
       end type
    public :: B_t
    end module B
    
    module C
    USE B
    implicit none
    private
    type, extends(B_t) :: C_t
       contains
         procedure :: set => set_C
         end type
    public :: C_t
    contains
      subroutine set_C(this)
        class(C_t), intent(inout) :: this
        write(*,*) 'Set from C'
        call this%B_t%A_t%set()      ! ERROR ON THIS LINE
        !call this%B_t%set()         ! WORKAROUND
        end subroutine set_C
    end module C
    
    
    
    $ xlf2003_r -c test.f90
    ** a   === End of Compilation 1 ===
    ** b   === End of Compilation 2 ===
    "test.f90", line 38.19: 1514-088 (S) Invalid component name.
    ** c   === End of Compilation 3 ===
    1501-511  Compilation failed for file test.f90.
    $
    

Local fix

  • Access prodecure via parent type.  See above test case.
    

Problem summary

  • PROBLEM DESCRIPTION:
    The compiler does not allow the reference to the parent
    component when it should be accessible.
    
    USERS AFFECTED:
    Users who have
    1. at least two levels of use association,
    and
    2. at least two levels of type hierarchy,
    and
    3. the last compilation unit references the parent component of
    the type that is declared in the top module,
    and
    4. the type has public accessibility in the module in which it
    is declared ,
    and
    5. The type is not accessible in the compilation unit where the
    parent component is referenced.
    

Problem conclusion

  • The standard says the parent component has the accessibility of
    its type.  It has been clarified that it means the
    accessibility of its type in the module in which it is
    declared.  Therefore, such usage is standard conforming.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV85623

  • Reported component name

    XL FORTRAN FOR

  • Reported component ID

    5725C7400

  • Reported release

    F13

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-06-10

  • Closed date

    2016-06-10

  • Last modified date

    2016-06-10

  • APAR is sysrouted FROM one or more of the following:

    LI78935

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL FORTRAN FOR

  • Fixed component ID

    5725C7400

Applicable component levels

[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH4D","label":"XL Fortran for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"F13"}]

Document Information

Modified date:
07 September 2021