Skip to content

uninitialized return values #8

Description

@andyc101

A number of functions return uninitialized variables if called with l_thoff set to .true. Example in forthread_create:

integer function forthread_create(thread_id,attr_id,run,arg)
    integer, intent(out) :: thread_id
    integer, intent(in) :: attr_id
    procedure(i_run) :: run !type i_run
    integer, target  :: arg

    integer :: i, info
    procedure(i_start_routine), bind(c), pointer :: start_routinep
    type(ptr_t_run), dimension(:), pointer       :: tmp
    type(t_run), pointer :: runp

    if (l_thoff) return
...

A possible fix by Peter Clark has been mentioned, that functions should return 0 if l_thoff is set to .true., but this is not currently documented on the github repository.

Should we further investigate this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions