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

Warning #8449 Without Cause

Ben3
Beginner
521 Views
Hi,

I've using generic overloaded type-bound procedures for multiple type/rank combinations, and getting a warning when I try to compile:

[fortran]module contain

  implicit none

  type container
   contains
     private
     generic,   public         :: Broadcast => Broadcast_integer_0, Broadcast_integer_1, Broadcast_logical_0, Broadcast_logical_1
     procedure                 :: Broadcast_integer_0
     procedure                 :: Broadcast_integer_1
     procedure                 :: Broadcast_logical_0
     procedure                 :: Broadcast_logical_1
  end type container

  type(container) :: x

contains

  subroutine Broadcast_integer_0 ( this, x, rank )
    class(container),  intent(in)    :: this
    integer,           intent(inout) :: x
    integer, optional, intent(in)    :: rank
    integer                          :: mpierror
    write(*, *) "in logical_0"
  end subroutine Broadcast_integer_0

  subroutine Broadcast_integer_1 ( this, x, rank )
    class(container),      intent(in)    :: this
    integer, dimension(:), intent(inout) :: x
    integer, optional,     intent(in)    :: rank
    integer                              :: mpierror
    write(*, *) "in integer_1"
  end subroutine Broadcast_integer_1

  subroutine Broadcast_logical_0 ( this, x, rank )
    class(container),  intent(in)    :: this
    logical,           intent(inout) :: x
    integer, optional, intent(in)    :: rank
    integer                          :: mpierror
    write(*, *) "in logical_0"
  end subroutine Broadcast_logical_0

  subroutine Broadcast_logical_1 ( this, x, rank )
    class(container),      intent(in)    :: this
    logical, dimension(:), intent(inout) :: x
    integer, optional,     intent(in)    :: rank
    integer                              :: mpierror
    write(*, *) "in logical_1"
  end subroutine Broadcast_logical_1

end module contain

program test

  use contain

  implicit none

  integer :: integer_scalar
  logical :: logical_scalar

  integer, dimension(10) :: integer_vector
  logical, dimension(10) :: logical_vector

  call x%Broadcast( integer_scalar )
  call x%Broadcast( integer_vector )

  call x%Broadcast( logical_scalar )
  call x%Broadcast( logical_vector )

end program test[/fortran]
When I compile it, I get the warning
[plain]test.f90(43): warning #8449: The type/rank/keyword signature for this specific procedure matches another specific procedure that shares the same generic binding name.   [BROADCAST_LOGICAL_1]
  subroutine Broadcast_logical_1 ( this, x, rank )[/plain]
It still runs correctly, though, so it's not a major problem:
[plain]bmenadue@weyl ~/bmenadue/Code/variational_analysis/trunk/src/modules>./a.out a
 in logical_0
 in integer_1
 in logical_0
 in logical_1[/plain]
I'm just curious what's causing this.
0 Kudos
4 Replies
Ron_Green
Moderator
521 Views
looks like an invalid warning. I'll start a bug report.

bug ID DPD200168113

ron
0 Kudos
Ben3
Beginner
521 Views
Cheers.

I've also discovered it does it for real, complex, and character types, along with logical, just not for integers.

Ben
0 Kudos
Ron_Green
Moderator
521 Views
I've got that noted. Thanks Ben.

ron
0 Kudos
Ron_Green
Moderator
521 Views
This error is fixed in the "Update 7" compiler, 12.1.1.246

thanks for sending this to us and helping to improve the compiler.

ron
0 Kudos
Reply