public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97122] New: Spurious FINAL ... must be in the specification part of a MODULE
@ 2020-09-20  0:21 ian_harvey at bigpond dot com
  2020-09-20  3:26 ` [Bug fortran/97122] " kargl at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: ian_harvey at bigpond dot com @ 2020-09-20  0:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97122

            Bug ID: 97122
           Summary: Spurious FINAL ... must be in the specification part
                    of a MODULE
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ian_harvey at bigpond dot com
  Target Milestone: ---

When compiling the following, recent master (and 10.2.1) issues an error 

  Error: Derived type declaration with FINAL at (1) must be in the
specification part of a MODULE

There is no such requirement in the language.



MODULE m
  IMPLICIT NONE
  INTERFACE
    MODULE SUBROUTINE other
      IMPLICIT NONE
    END SUBROUTINE other
  END INTERFACE
END MODULE m

SUBMODULE (m) s
  IMPLICIT NONE
  TYPE :: t
  CONTAINS
    FINAL :: p
  END TYPE t
CONTAINS
  SUBROUTINE p(arg)
    TYPE(t), INTENT(INOUT) :: arg
  END SUBROUTINE p

  MODULE SUBROUTINE other
  END SUBROUTINE other
END SUBMODULE s



]$ gfortran -v -c 2020-09-20\ final.f90
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-pc-linux-gnu
Configured with: .././src/configure --prefix=/home/MEGMS2/ian/usr/gcc-11.0.0
--enable-languages=c,c++,fortran,lto --enable-libgomp --enable-checking=release
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200919 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic' '-march=x86-64'
 /home/MEGMS2/ian/usr/gcc-11.0.0/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/f951
2020-09-20 final.f90 -quiet -dumpbase 2020-09-20 final.f90 -dumpbase-ext .f90
-mtune=generic -march=x86-64 -version -fintrinsic-modules-path
/home/MEGMS2/ian/usr/gcc-11.0.0/lib/gcc/x86_64-pc-linux-gnu/11.0.0/finclude
-fpre-include=/usr/include/finclude/math-vector-fortran.h -o /tmp/ccPu3yxp.s
GNU Fortran (GCC) version 11.0.0 20200919 (experimental) (x86_64-pc-linux-gnu)
        compiled by GNU C version 11.0.0 20200919 (experimental), GMP version
6.1.2, MPFR version 4.0.2-p9, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 11.0.0 20200919 (experimental)
(x86_64-pc-linux-gnu)
        compiled by GNU C version 11.0.0 20200919 (experimental), GMP version
6.1.2, MPFR version 4.0.2-p9, MPC version 1.1.0, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
2020-09-20 final.f90:14:10:

   14 |     FINAL :: p
      |          1
Error: Derived type declaration with FINAL at (1) must be in the specification
part of a MODULE

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

end of thread, other threads:[~2023-09-09 11:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-20  0:21 [Bug fortran/97122] New: Spurious FINAL ... must be in the specification part of a MODULE ian_harvey at bigpond dot com
2020-09-20  3:26 ` [Bug fortran/97122] " kargl at gcc dot gnu.org
2023-05-04  6:13 ` pault at gcc dot gnu.org
2023-05-04  8:07 ` pault at gcc dot gnu.org
2023-05-04 17:45 ` kargl at gcc dot gnu.org
2023-05-04 19:01 ` kargl at gcc dot gnu.org
2023-05-04 22:17 ` ian_harvey at bigpond dot com
2023-05-07 15:59 ` kargl at gcc dot gnu.org
2023-05-07 18:41 ` anlauf at gcc dot gnu.org
2023-05-08  1:16 ` kargl at gcc dot gnu.org
2023-05-08  6:09 ` pault at gcc dot gnu.org
2023-05-23  5:33 ` cvs-commit at gcc dot gnu.org
2023-09-07 19:04 ` anlauf at gcc dot gnu.org
2023-09-09 11:00 ` pault at gcc dot gnu.org

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).