[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-12-03 Thread abensonca at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #18 from Andrew Benson  ---
Thanks Janus. I can confirm that I see no more of these warnings now!

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-12-03 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #17 from janus at gcc dot gnu.org ---
(In reply to Andrew Benson from comment #15)
> The patch fixes most cases but, when compiling my full code I found some
> cases which still report the erroneous warning.

Thanks for reporting, Andrew.

I have just committed a minor addition in r243218 that fixes this case as well,
so that we can finally close this PR.

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-12-03 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #16 from janus at gcc dot gnu.org ---
Author: janus
Date: Sat Dec  3 09:32:27 2016
New Revision: 243218

URL: https://gcc.gnu.org/viewcvs?rev=243218&root=gcc&view=rev
Log:
2016-12-03  Janus Weil  

PR fortran/58175
* resolve.c (gfc_resolve_finalizers): Prevent bogus warning.

2016-12-03  Janus Weil  

PR fortran/58175
* gfortran.dg/finalize_30.f90: Extend test case.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/finalize_30.f90

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-11-30 Thread abensonca at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

Andrew Benson  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #15 from Andrew Benson  ---
Hi Janus,

The patch fixes most cases but, when compiling my full code I found some cases
which still report the erroneous warning. These seem to be with cases where a
derived type extends another derived type. For example, with gfortran 7.0.0 (r
242964) the following occurs:

module ct
  type :: a
   contains
 final :: aD
  end type a
  type, extends(a) :: a1
   contains
  end type a1
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-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 7.0.0 20161129 (experimental) (GCC) 

$ gfortran -c bug.F90 -o bug.o -Wall
bug.F90:7:24:

   type, extends(a) :: a1
1
Warning: Only array FINAL procedures declared for derived type 'a1' defined at
(1), suggest also scalar one [-Wsurprising]
bug.F90:16:6:

   use ct
  1
Warning: Only array FINAL procedures declared for derived type 'a1' defined at
(1), suggest also scalar one [-Wsurprising]
bug.F90:11:20:

   subroutine aD(self)
1
Warning: Unused dummy argument 'self' at (1) [-Wunused-dummy-argument]

So, there's no warning about the finalizer for type "a", but for type "a1"
there's still a warning present.

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-11-29 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #14 from janus at gcc dot gnu.org ---
Fixed with r242960. Closing.

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-11-29 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #13 from janus at gcc dot gnu.org ---
Author: janus
Date: Tue Nov 29 14:15:29 2016
New Revision: 242960

URL: https://gcc.gnu.org/viewcvs?rev=242960&root=gcc&view=rev
Log:
2016-11-29  Tobias Burnus  

PR fortran/58175
* resolve.c (gfc_resolve_finalizers): Properly detect scalar
finalizers.

2016-11-29  Janus Weil  

PR fortran/58175
* gfortran.dg/finalize_30.f90: New test case.

Added:
trunk/gcc/testsuite/gfortran.dg/finalize_30.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-11-26 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org

--- Comment #12 from janus at gcc dot gnu.org ---
The patch in comment #1 still works and regtests fine. I'll take care of
committing it ...

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-07-07 Thread jhogg41 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #11 from Jonathan Hogg  ---
It looks like there's already a patch there, if you point me at a list of
what needs doing to get it into the code base, I'm happy to take a look.

Thanks,

Jonathan.

On Thu, Jul 7, 2016 at 4:14 PM, dominiq at lps dot ens.fr <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175
>
> --- Comment #10 from Dominique d'Humieres  ---
> > Still present in 6.1.1, please fix.
>
> You're welcome to do it!
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-07-07 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #10 from Dominique d'Humieres  ---
> Still present in 6.1.1, please fix.

You're welcome to do it!

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-07-07 Thread jhogg41 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

Jonathan Hogg  changed:

   What|Removed |Added

 CC||jhogg41 at gmail dot com

--- Comment #9 from Jonathan Hogg  ---
Still present in 6.1.1, please fix.

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2016-03-19 Thread neil.n.carlson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

neil.n.carlson at gmail dot com changed:

   What|Removed |Added

 CC||neil.n.carlson at gmail dot com

--- Comment #8 from neil.n.carlson at gmail dot com ---
*** Bug 70312 has been marked as a duplicate of this bug. ***

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2015-09-03 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #7 from Dominique d'Humieres  ---
*** Bug 66291 has been marked as a duplicate of this bug. ***


[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2015-08-15 Thread abensonca at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

--- Comment #6 from Andrew Benson  ---
This problem still occurs in gcc 6.0.0. In a code which makes extensive use of
finalizors it results in many thousands of erroneous warning messages during
compile, which have to be filtered out to find the real warnings. Is there any
way I can help get the proposed patch committed (e.g. maybe testing it to
ensure it introduces no regressions)?


[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2015-05-23 Thread casey.webster at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

Casey Webster  changed:

   What|Removed |Added

 CC||casey.webster at gmail dot com

--- Comment #5 from Casey Webster  ---
This bug still exists in fortran 5.1.0 (released version).  My testcase ended
up being a duplicate of the original post, so I won't repost that.

% gfortran -Wall -o final_bug_2 final_bug_2.f90
final_bug_2.f90:13:6:

   use A
  1
Warning: Only array FINAL procedures declared for derived type ‘typea’ defined
at (1), suggest also scalar one [-Wsurprising]

% gfortran -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.1.0/gfortran
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-5.1.0/work/gcc-5.1.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.1.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.1.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.1.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.1.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/5.1.0/python
--enable-objc-gc --enable-languages=c,c++,java,go,objc,obj-c++,fortran
--enable-obsolete --enable-secureplt --disable-werror --with-system-zlib
--enable-nls --without-included-gettext --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.1.0 p1.0,
pie-0.6.3' --enable-libstdcxx-time --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp
--enable-libcilkrts --enable-lto --with-isl --disable-isl-version-check
--enable-libsanitizer
Thread model: posix
gcc version 5.1.0 (Gentoo 5.1.0 p1.0, pie-0.6.3)

[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2015-01-02 Thread patnel97269-gfortran at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

patnel97269-gfortran at yahoo dot fr changed:

   What|Removed |Added

 CC||patnel97269-gfortran@yahoo.
   ||fr

--- Comment #4 from patnel97269-gfortran at yahoo dot fr ---
I still have this bug in 4.9.2 . Why not committing the patch ?


[Bug fortran/58175] [OOP] Incorrect warning message on scalar finalizer

2013-12-09 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58175

janus at gcc dot gnu.org changed:

   What|Removed |Added

Summary|[F03] Incorrect warning |[OOP] Incorrect warning
   |message on scalar finalizer |message on scalar finalizer

--- Comment #3 from janus at gcc dot gnu.org ---
(In reply to Tobias Burnus from comment #1)
> Untested patch.

Any ambitions to commit this?