This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42809] Too much noise with -Wconversion
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2010 20:43:04 -0000
- Subject: [Bug fortran/42809] Too much noise with -Wconversion
- References: <bug-42809-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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