public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/97036] New: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
@ 2020-09-12 21:01 ian_harvey at bigpond dot com
  2020-09-13 21:41 ` [Bug fortran/97036] " anlauf at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ian_harvey at bigpond dot com @ 2020-09-12 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97036
           Summary: [F2018] ELEMENTAL RECURSIVE subprogram prefix
                    combination rejected
           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: ---

F2018 removed the previous syntax restriction (F2008 C1245) on a subprogram
definition with both ELEMENTAL and RECURSIVE.

  MODULE m
    IMPLICIT NONE
  CONTAINS
    ELEMENTAL RECURSIVE SUBROUTINE foo
    END SUBROUTINE foo
  END MODULE m



$ gfortran --version
GNU Fortran (GCC) 11.0.0 20200905 (experimental)



$ gfortran -c 2020-09-13\ elemental-recursive.f90 -std=f2018
2020-09-13 elemental-recursive.f90:4:22:

    4 |   ELEMENTAL RECURSIVE SUBROUTINE foo
      |                      1
Error: ELEMENTAL attribute conflicts with RECURSIVE attribute at (1)
2020-09-13 elemental-recursive.f90:5:5:

    5 |   END SUBROUTINE foo
      |     1
Error: Expecting END MODULE statement at (1)

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

* [Bug fortran/97036] [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
  2020-09-12 21:01 [Bug fortran/97036] New: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected ian_harvey at bigpond dot com
@ 2020-09-13 21:41 ` anlauf at gcc dot gnu.org
  2020-09-15 20:36 ` anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-09-13 21:41 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #1 from anlauf at gcc dot gnu.org ---
Untested patch:

diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index abd3b5ccfd0..3e2ff0954d6 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -569,7 +569,7 @@ gfc_check_conflict (symbol_attribute *attr, const char
*name, locus *where)
   conf_std (allocatable, dummy, GFC_STD_F2003);
   conf_std (allocatable, function, GFC_STD_F2003);
   conf_std (allocatable, result, GFC_STD_F2003);
-  conf (elemental, recursive);
+  conf_std (elemental, recursive, GFC_STD_F2018);

   conf (in_common, dummy);
   conf (in_common, allocatable);

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

* [Bug fortran/97036] [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
  2020-09-12 21:01 [Bug fortran/97036] New: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected ian_harvey at bigpond dot com
  2020-09-13 21:41 ` [Bug fortran/97036] " anlauf at gcc dot gnu.org
@ 2020-09-15 20:36 ` anlauf at gcc dot gnu.org
  2020-09-19 18:47 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:47 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-09-15 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-09-15
           Keywords|                            |rejects-valid
           Priority|P3                          |P4

--- Comment #2 from anlauf at gcc dot gnu.org ---
Patch: https://gcc.gnu.org/pipermail/fortran/2020-September/055088.html

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

* [Bug fortran/97036] [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
  2020-09-12 21:01 [Bug fortran/97036] New: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected ian_harvey at bigpond dot com
  2020-09-13 21:41 ` [Bug fortran/97036] " anlauf at gcc dot gnu.org
  2020-09-15 20:36 ` anlauf at gcc dot gnu.org
@ 2020-09-19 18:47 ` cvs-commit at gcc dot gnu.org
  2020-09-19 18:47 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-19 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:f7d2d4be7650acceb9d39327e21ee04f640c152f

commit r11-3298-gf7d2d4be7650acceb9d39327e21ee04f640c152f
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Sep 19 20:46:38 2020 +0200

    PR fortran/97036 - [F2018] Allow ELEMENTAL RECURSIVE procedure prefix

    gcc/fortran/ChangeLog:

            * symbol.c (gfc_check_conflict): Allow ELEMENTAL RECURSIVE
            procedure prefix for -std=f2018.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pr97036.f90: New test.

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

* [Bug fortran/97036] [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected
  2020-09-12 21:01 [Bug fortran/97036] New: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected ian_harvey at bigpond dot com
                   ` (2 preceding siblings ...)
  2020-09-19 18:47 ` cvs-commit at gcc dot gnu.org
@ 2020-09-19 18:47 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-09-19 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from anlauf at gcc dot gnu.org ---
Fixed on master for gcc-11.

Thanks for the report!

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

end of thread, other threads:[~2020-09-19 18:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 21:01 [Bug fortran/97036] New: [F2018] ELEMENTAL RECURSIVE subprogram prefix combination rejected ian_harvey at bigpond dot com
2020-09-13 21:41 ` [Bug fortran/97036] " anlauf at gcc dot gnu.org
2020-09-15 20:36 ` anlauf at gcc dot gnu.org
2020-09-19 18:47 ` cvs-commit at gcc dot gnu.org
2020-09-19 18:47 ` anlauf 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).