public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE
@ 2022-05-08 20:38 anlauf at gcc dot gnu.org
  2022-05-09 20:21 ` [Bug fortran/105526] " anlauf at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-08 20:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105526
           Summary: [Coarray] Missing checks for arguments of type
                    TEAM_TYPE
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

The following code is erroneously accepted:

subroutine bad
  use iso_fortran_env, only: team_type
  implicit none
  type(team_type) :: team
  change team (0)
  end team
  form team (0, 0)
  sync team (0)
end subroutine bad

It should rather read like:

subroutine good
  use iso_fortran_env, only: team_type
  implicit none
  type(team_type) :: team
  change team (team)
  end team
  form team (0, team)
  sync team (team)
end subroutine good

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

* [Bug fortran/105526] [Coarray] Missing checks for arguments of type TEAM_TYPE
  2022-05-08 20:38 [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE anlauf at gcc dot gnu.org
@ 2022-05-09 20:21 ` anlauf at gcc dot gnu.org
  2022-05-10 18:13 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-09 20:21 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org
   Last reconfirmed|                            |2022-05-09

--- Comment #1 from anlauf at gcc dot gnu.org ---
Patch submitted: https://gcc.gnu.org/pipermail/fortran/2022-May/057842.html

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

* [Bug fortran/105526] [Coarray] Missing checks for arguments of type TEAM_TYPE
  2022-05-08 20:38 [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE anlauf at gcc dot gnu.org
  2022-05-09 20:21 ` [Bug fortran/105526] " anlauf at gcc dot gnu.org
@ 2022-05-10 18:13 ` cvs-commit at gcc dot gnu.org
  2022-05-10 18:16 ` anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-10 18:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:5edd0802696f94012731306c704eaf61d184e09c

commit r13-277-g5edd0802696f94012731306c704eaf61d184e09c
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Mon May 9 22:14:21 2022 +0200

    Fortran: check TEAM arguments to coarray intrinsics

    TEAM arguments to coarray intrinsics must be scalar expressions of type
    TEAM_TYPE of intrinsic module ISO_FORTRAN_ENV.

    gcc/fortran/ChangeLog:

            PR fortran/105526
            * resolve.cc (check_team): New.
            (gfc_resolve_code): Add checks for arguments to coarray intrinsics
            FORM TEAM, CHANGE TEAM, and SYNC TEAM.

    gcc/testsuite/ChangeLog:

            PR fortran/105526
            * gfortran.dg/coarray_50.f90: New test.

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

* [Bug fortran/105526] [Coarray] Missing checks for arguments of type TEAM_TYPE
  2022-05-08 20:38 [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE anlauf at gcc dot gnu.org
  2022-05-09 20:21 ` [Bug fortran/105526] " anlauf at gcc dot gnu.org
  2022-05-10 18:13 ` cvs-commit at gcc dot gnu.org
@ 2022-05-10 18:16 ` anlauf at gcc dot gnu.org
  2023-07-07 18:19 ` anlauf at gcc dot gnu.org
  2023-07-07 23:35 ` kargl at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-05-10 18:16 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |13.0
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from anlauf at gcc dot gnu.org ---
Fixed for gcc-13.

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

* [Bug fortran/105526] [Coarray] Missing checks for arguments of type TEAM_TYPE
  2022-05-08 20:38 [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE anlauf at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-05-10 18:16 ` anlauf at gcc dot gnu.org
@ 2023-07-07 18:19 ` anlauf at gcc dot gnu.org
  2023-07-07 23:35 ` kargl at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-07-07 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gscfq@t-online.de

--- Comment #4 from anlauf at gcc dot gnu.org ---
*** Bug 103796 has been marked as a duplicate of this bug. ***

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

* [Bug fortran/105526] [Coarray] Missing checks for arguments of type TEAM_TYPE
  2022-05-08 20:38 [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE anlauf at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-07-07 18:19 ` anlauf at gcc dot gnu.org
@ 2023-07-07 23:35 ` kargl at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2023-07-07 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to anlauf from comment #4)
> *** Bug 103796 has been marked as a duplicate of this bug. ***

The diff attached to the duplicate did handle the optional form-team-spec-list.

+
+  /* Abort if the unsupported form-team-spec-list is detected. */
+  gfc_gobble_whitespace ();
+  if (gfc_peek_ascii_char () == ',')
+    {
+       gfc_error ("Comma detected at %C.  The optional [, "
+                  "form-team-spec-list ] is unsupported.  Be a hero and "
+                  "join the gfortran development team.");
+       return MATCH_ERROR;
+    }

gfortran currently gives

hotrats:kargl[203] gfcx -c -fcoarray=single a.f90
a.f90:7:22:

    7 | FORM TEAM (ME(1), ROW, NEW_INDEX=ME(2))
      |                      1
Error: Syntax error in FORM TEAM statement at (1)

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

end of thread, other threads:[~2023-07-07 23:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-08 20:38 [Bug fortran/105526] New: [Coarray] Missing checks for arguments of type TEAM_TYPE anlauf at gcc dot gnu.org
2022-05-09 20:21 ` [Bug fortran/105526] " anlauf at gcc dot gnu.org
2022-05-10 18:13 ` cvs-commit at gcc dot gnu.org
2022-05-10 18:16 ` anlauf at gcc dot gnu.org
2023-07-07 18:19 ` anlauf at gcc dot gnu.org
2023-07-07 23:35 ` kargl 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).