public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/58175] New: Incorrect warning message on scalar finalizor
@ 2013-08-16 17:29 abensonca at gmail dot com
  2013-08-16 19:48 ` [Bug fortran/58175] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: abensonca at gmail dot com @ 2013-08-16 17:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58175
           Summary: Incorrect warning message on scalar finalizor
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: abensonca at gmail dot com

With gfortran 4.9.0 (r201776) the following causes an incorrect warning message
to be issued:

module ct
  type :: a
   contains
     final :: aD
  end type a
contains
  subroutine aD(self)
    type(a), intent(inout) :: self
  end subroutine aD
end module ct
program test
  use ct
end program test

$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fortran --disable-multilib
--with-gmp=/home/abenson/Galacticus/Tools
Thread model: posix
gcc version 4.9.0 20130815 (experimental) (GCC) 

$ gfortran -c bug1.F90 -o bug1.o -Wall
bug1.F90:12.6:

  use ct
      1
Warning: Only array FINAL procedures declared for derived type 'a' defined at
(1), suggest also scalar one
bug1.F90:7.20:

  subroutine aD(self)
                    1
Warning: Unused dummy argument 'self' at (1)

Only a scalar finalizor is present, but the warning suggests that an array but
no scalar finalizor is present.

The warning is only issued if the "ct" module is USEd.

Adding an array finalizor or making the scalar finalizor ELEMENTAL does not
change the warning message.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-03 16:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-16 17:29 [Bug fortran/58175] New: Incorrect warning message on scalar finalizor abensonca at gmail dot com
2013-08-16 19:48 ` [Bug fortran/58175] " burnus at gcc dot gnu.org
2013-08-21 12:58 ` [Bug fortran/58175] [F03] Incorrect warning message on scalar finalizer janus at gcc dot gnu.org
2013-12-09 18:14 ` [Bug fortran/58175] [OOP] " janus at gcc dot gnu.org
2015-01-02 15:06 ` patnel97269-gfortran at yahoo dot fr
2015-05-24  2:11 ` casey.webster at gmail dot com
2015-08-15 21:10 ` abensonca at gmail dot com
2015-09-03 16:08 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).