public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
@ 2021-11-03  5:21 damian at sourceryinstitute dot org
  2021-11-03 13:42 ` [Bug fortran/103054] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: damian at sourceryinstitute dot org @ 2021-11-03  5:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103054
           Summary: [f18] Gfortran accepts invalid and rejects valid
                    co_reduce argument keyword name
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at sourceryinstitute dot org
  Target Milestone: ---

In TS 18508, the second summy argument to co_reduce had the keyword name
"operator."  In the Fortran 2018 standard, the corresponding argument has the
name "operation."  GFortran accepts the non-standard keyword argument name
"operator" and rejects the standard name "operation."

% cat co_reduce.f90 
  implicit none
  logical :: co_all= .true.
  call co_reduce(co_all, operator=both)
  call co_reduce(co_all, operation=both)
contains
  logical pure function both(lhs,rhs)
    logical, intent(in) :: lhs, rhs
    both = lhs .and. rhs
  end function
end

⌁74% [rouson:~] % gfortran -fcoarray=single co_reduce.f90 
co_reduce.f90:4:40:

    4 |   call co_reduce(co_all, operation=both)
      |                                        1
Error: Cannot find keyword named 'operation' in call to 'co_reduce' at (1)
% gfortran --version
GNU Fortran (Homebrew GCC 11.2.0) 11.2.0

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

* [Bug fortran/103054] [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
  2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
@ 2021-11-03 13:42 ` kargl at gcc dot gnu.org
  2021-11-07  8:03 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-11-03 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #1 from kargl at gcc dot gnu.org ---
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 219f04f2317..0e3dfd9e5e6 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -3805,7 +3805,7 @@ add_subroutines (void)
              BT_UNKNOWN, 0, GFC_STD_F2018,
              gfc_check_co_reduce, NULL, NULL,
              a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
-             "operator", BT_INTEGER, di, REQUIRED, INTENT_IN,
+             "operation", BT_INTEGER, di, REQUIRED, INTENT_IN,
              result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
              stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
              errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT);

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

* [Bug fortran/103054] [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
  2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
  2021-11-03 13:42 ` [Bug fortran/103054] " kargl at gcc dot gnu.org
@ 2021-11-07  8:03 ` pinskia at gcc dot gnu.org
  2021-11-07 15:46 ` jvdelisle2 at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-07  8:03 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-11-07
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug fortran/103054] [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
  2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
  2021-11-03 13:42 ` [Bug fortran/103054] " kargl at gcc dot gnu.org
  2021-11-07  8:03 ` pinskia at gcc dot gnu.org
@ 2021-11-07 15:46 ` jvdelisle2 at gmail dot com
  2021-11-07 16:06 ` kargl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle2 at gmail dot com @ 2021-11-07 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle2 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle2 at gmail dot com

--- Comment #3 from Jerry DeLisle <jvdelisle2 at gmail dot com> ---
I will commit as obvious.

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

* [Bug fortran/103054] [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
  2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
                   ` (2 preceding siblings ...)
  2021-11-07 15:46 ` jvdelisle2 at gmail dot com
@ 2021-11-07 16:06 ` kargl at gcc dot gnu.org
  2021-11-07 20:49 ` anlauf at gcc dot gnu.org
  2021-11-07 22:43 ` tkoenig at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-11-07 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from kargl at gcc dot gnu.org ---
Created attachment 51745
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51745&action=edit
documentation update

Forgot the documentation part of the patch.

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

* [Bug fortran/103054] [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
  2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
                   ` (3 preceding siblings ...)
  2021-11-07 16:06 ` kargl at gcc dot gnu.org
@ 2021-11-07 20:49 ` anlauf at gcc dot gnu.org
  2021-11-07 22:43 ` tkoenig at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-11-07 20:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from anlauf at gcc dot gnu.org ---
Please have a look at the testsuite, too.

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

* [Bug fortran/103054] [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name
  2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
                   ` (4 preceding siblings ...)
  2021-11-07 20:49 ` anlauf at gcc dot gnu.org
@ 2021-11-07 22:43 ` tkoenig at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-11-07 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed by https://gcc.gnu.org/g:962ff7d2849e1fa6a1fe0535aa2dec5c2b9a32a6

Thanks for the bug report!

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

end of thread, other threads:[~2021-11-07 22:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03  5:21 [Bug fortran/103054] New: [f18] Gfortran accepts invalid and rejects valid co_reduce argument keyword name damian at sourceryinstitute dot org
2021-11-03 13:42 ` [Bug fortran/103054] " kargl at gcc dot gnu.org
2021-11-07  8:03 ` pinskia at gcc dot gnu.org
2021-11-07 15:46 ` jvdelisle2 at gmail dot com
2021-11-07 16:06 ` kargl at gcc dot gnu.org
2021-11-07 20:49 ` anlauf at gcc dot gnu.org
2021-11-07 22:43 ` tkoenig 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).