------- Comment #5 from anlauf at gmx dot de  2010-01-22 20:43 -------
There is also a lot of noise when a derived type with default
initialization is instantiated.  Moreover, the warnings point
to an unexpected locus.  Consider:

module bla
  implicit none
  integer, parameter :: i1 = 1, i2 = 2
  type t_datum
     integer(i1) :: state  = 0
     integer(i2) :: flags  = 0
  end type t_datum
  type t_x
    type(t_datum) :: a
    type(t_datum) :: b
  end type t_x
contains
  subroutine dummy
  end subroutine dummy
end module bla
!------------------------------------------------
module foo
  use bla, only: t_x,   &! Derived type
                 dummy   ! Some unused subroutine
  implicit none
contains
  subroutine work
    type (t_x)  :: x
  end subroutine work
end module foo


This gives:

gfcbug101.f90:19.49:

                 dummy   ! Some unused subroutine
                                                 1
Warning: Conversion from INTEGER(4) to INTEGER(1) at (1)
gfcbug101.f90:19.49:

                 dummy   ! Some unused subroutine
                                                 1
Warning: Conversion from INTEGER(4) to INTEGER(2) at (1)
gfcbug101.f90:19.49:

                 dummy   ! Some unused subroutine
                                                 1
Warning: Conversion from INTEGER(4) to INTEGER(1) at (1)
gfcbug101.f90:19.49:

                 dummy   ! Some unused subroutine
                                                 1
Warning: Conversion from INTEGER(4) to INTEGER(2) at (1)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42809

Reply via email to