Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

UDDTIO error checking error

$
0
0

I have a few UDDTIO issues outstanding from the beta that introduced them.  I don't think this duplicates any of those.

MODULE M20140921c
  IMPLICIT NONE
  PRIVATE

  TYPE, PUBLIC :: JustSomeType
  END TYPE JustSomeType

  TYPE :: TypeWithPointerComponent
    TYPE(JustSomeType), POINTER :: PointerComponent
  END TYPE TypeWithPointerComponent

  TYPE, PUBLIC :: TypeWithWriteFormattedBinding
    PRIVATE
    TYPE(TypeWithPointerComponent) :: ComponentWithAPointerComponent
  CONTAINS
    PROCEDURE, NON_OVERRIDABLE, PRIVATE :: write_formatted
    GENERIC :: WRITE(FORMATTED) => write_formatted
  END TYPE TypeWithWriteFormattedBinding
CONTAINS
  SUBROUTINE write_formatted(dtv, unit, iotype, v_list, iostat, iomsg)
    CLASS(TypeWithWriteFormattedBinding), INTENT(IN) :: dtv
    INTEGER, INTENT(IN) :: unit
    CHARACTER(*), INTENT(IN) :: iotype
    INTEGER, INTENT(IN) :: v_list(:)
    INTEGER, INTENT(OUT) :: iostat
    CHARACTER(*), INTENT(INOUT) :: iomsg
    !***************************************************************************
    WRITE (unit, "(A)") 'Hello!'
  END SUBROUTINE write_formatted

  SUBROUTINE s
    TYPE(TypeWithWriteFormattedBinding) :: t
    PRINT *, t
    PRINT "(DT)", t
  END SUBROUTINE s
END MODULE M20140921c

 

>ifort /c /warn:all /check:all /standard-semantics /stand UDDDTIOComponentWithPointer.f90
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 15.0.0.108 Build 20140726
Copyright (C) 1985-2014 Intel Corporation.  All rights reserved.

UDDDTIOComponentWithPointer.f90(21): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value.   [IOSTAT]
  SUBROUTINE write_formatted(dtv, unit, iotype, v_list, iostat, iomsg)
--------------------------------------------------------^
UDDDTIOComponentWithPointer.f90(21): remark #7712: This variable has not been used.   [DTV]
  SUBROUTINE write_formatted(dtv, unit, iotype, v_list, iostat, iomsg)
-----------------------------^
(...etc, until...)
UDDDTIOComponentWithPointer.f90(35): error #5514: A derived type I/O list item that contains a pointer component requires a user-defined derived-type input/output procedure.
    PRINT "(DT)", t
----^
compilation aborted for UDDDTIOComponentWithPointer.f90 (code 1)

But, but, but... it has one...


Viewing all articles
Browse latest Browse all 1424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>