public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109684] New: compiling failure: complaining about a final subroutine of a type being not PURE (while it is indeed PURE)
@ 2023-05-01 13:39 wangmianzhi1 at linuxmail dot org
  2023-05-17 14:44 ` [Bug fortran/109684] " wangmianzhi1 at linuxmail dot org
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: wangmianzhi1 at linuxmail dot org @ 2023-05-01 13:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109684
           Summary: compiling failure: complaining about a final
                    subroutine of a type being not PURE (while it is
                    indeed PURE)
           Product: gcc
           Version: 13.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wangmianzhi1 at linuxmail dot org
  Target Milestone: ---

Created attachment 54964
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54964&action=edit
build with cmake

This issue emerges after upgrading to Fedora 38 (gcc version 13.1.1 20230426)
from Fedora 37 (gcc 12.x series). There was no issue in Fedora 37.

The issue takes place when:
mkdir build; cd build; cmake ..; make

GCC would popup an error message like this:
/home/mianzhi/Desktop/final_subroutine_not_pure/src/test/basicFEM1.f90:3:0:

    3 | function basicFEM1() result(ierr)
      | 
Error: Contained procedure ‘__final_modotgrid_Otgrid’ at (1) of a PURE
procedure must also be PURE

The f90 file that actually contains the otGrid type with its final procedure
compiles fine. The basicFEM1.f90 uses module modFileIO, which has an interface
that involves type otGrid.

The attached is a stripped-down version of the code. I've tried to further
simplify the code but removing seemingly irrelevant things could prevent the
error from happening.

Thank you very much for your help.

Best regards,
Mianzhi

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

end of thread, other threads:[~2023-11-06 18:40 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 13:39 [Bug fortran/109684] New: compiling failure: complaining about a final subroutine of a type being not PURE (while it is indeed PURE) wangmianzhi1 at linuxmail dot org
2023-05-17 14:44 ` [Bug fortran/109684] " wangmianzhi1 at linuxmail dot org
2023-05-22  6:33 ` trnka at scm dot com
2023-05-22  6:36 ` trnka at scm dot com
2023-05-22  6:39 ` trnka at scm dot com
2023-05-23 16:53 ` pault at gcc dot gnu.org
2023-05-24 10:05 ` pault at gcc dot gnu.org
2023-05-24 10:13 ` trnka at scm dot com
2023-05-24 12:37 ` neil.n.carlson at gmail dot com
2023-08-07 20:39 ` neil.n.carlson at gmail dot com
2023-08-07 22:04 ` kargl at gcc dot gnu.org
2023-08-07 22:23 ` sgk at troutmask dot apl.washington.edu
2023-08-07 22:58 ` sgk at troutmask dot apl.washington.edu
2023-08-08 13:27 ` pault at gcc dot gnu.org
2023-08-09  2:29 ` kargl at gcc dot gnu.org
2023-08-09  7:58 ` pault at gcc dot gnu.org
2023-08-09  8:11 ` pault at gcc dot gnu.org
2023-08-09 10:08 ` trnka at scm dot com
2023-08-09 11:04 ` cvs-commit at gcc dot gnu.org
2023-08-09 14:54 ` cvs-commit at gcc dot gnu.org
2023-08-09 14:56 ` pault at gcc dot gnu.org
2023-08-09 15:37 ` sgk at troutmask dot apl.washington.edu
2023-08-09 16:19 ` trnka at scm dot com
2023-08-09 16:59 ` sgk at troutmask dot apl.washington.edu
2023-11-06 15:34 ` trnka at scm dot com
2023-11-06 18:40 ` sgk at troutmask dot apl.washington.edu

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