Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

New error in v16 for uddtio

Simon_Geard
新貢獻者 I
902 檢視

I have just installed v16 and code which compiled fine with all the previous v16 betas, v15 and v14 now no longer compiles. I get the following error message on lines of code that use UDDTIO, e.g.

    subroutine dump_strsum(f)
        character(len=*), intent(in) :: f
        integer :: u
        open(newunit=u,file=f,access='sequential',status='replace')
        write(u,'(dt)') strsum_data
        close(u)
    end subroutine dump_strsum

 

error #5521: A derived-type object in an input/output list cannot have inaccessible components unless a suitable user-defined input/output procedure is available.

As far as I can see all the components are public so I don't understand why this message has started appearing. Is there a new, more stringent, check? Is there anyway of working out what the actual error is? I have tried disabling error 5521 but that isn't allowed.

Thanks.

0 積分
5 回應
Steven_L_Intel1
902 檢視

Yes, we fixed a bug where the compiler didn't diagnose an error here. You haven't provided a complete test case so it's impossible to know if we made a mistake somewhere.

Simon_Geard
新貢獻者 I
902 檢視

I've attached an example which shows the problem.

Basically it seems to be due to a change in the behaviour of the 'only' qualification of the 'use' statement. The type 'strsum_f' is defined through inheritance used with an 'only' qualification:

    use file_io, only: strsum_f

However the types from which strsum_f inherit are now excluded so the code doesn't compile. If I change the code to either

    use file_io

or

    use file_io_base
    use file_io, only: dir_binary_g
    use file_io, only: strsum_f

This change seem to limit the usefulness of the 'only' qualification since it requires the application to know what the inheritance tree is which ought to be wrong. Looks like a bug to me.
 

Steven_L_Intel1
902 檢視

Thanks - this is the same issue as https://software.intel.com/en-us/forums/topic/543069 , DPD200367665. Not fixed yet.

Simon_Geard
新貢獻者 I
902 檢視

Do you know yet whether it will be fixed in the first update?
 

Steven_L_Intel1
902 檢視

I spoke with the developer it's assigned to and he promised to look at it next. That's all I can tell you now.

回覆