Bug 103796 - form-team-spec-list is unsupported
Summary: form-team-spec-list is unsupported
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 12.0
: P4 normal
Target Milestone: ---
Assignee: Andre Vehreschild
URL:
Keywords:
Depends on:
Blocks: Coarray
  Show dependency treegraph
 
Reported: 2021-12-21 18:19 UTC by G. Steinmetz
Modified: 2025-03-24 14:44 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-12-22 00:00:00


Attachments
Check FORM TEAM (897 bytes, patch)
2021-12-22 21:10 UTC, kargls
Details | Diff
New diff (892 bytes, patch)
2021-12-22 23:21 UTC, kargls
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description G. Steinmetz 2021-12-21 18:19:38 UTC
Started with r8 :


$ cat z1.f90
program p
   form team ('a', team)
end


$ cat z2.f90
program p
   form team (1, team)
end


$ gfortran-12-20211219 -c z1.f90 -fcoarray=single
$
$ gfortran-12-20211219 -c z1.f90 -fcoarray=lib
z1.f90:2:24:

    2 |    form team ('a', team)
      |                        1
internal compiler error: in gfc_conv_expr_val, at fortran/trans-expr.c:9446
0x888132 gfc_conv_expr_val(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:9446
0x8ce5bd gfc_trans_form_team(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:744
0x854747 trans_code
        ../../gcc/fortran/trans.c:2068
0x87d6be gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:7644
0x80063e translate_all_program_units
        ../../gcc/fortran/parse.c:6651
0x80063e gfc_parse_file()
        ../../gcc/fortran/parse.c:6938
0x84d53f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216
Comment 1 Martin Liška 2021-12-22 08:45:50 UTC
Started with r8-6395-gf8862a1b2afad9d1.
Comment 2 kargls 2021-12-22 21:10:00 UTC
Created attachment 52045 [details]
Check FORM TEAM

The requirements on parsing of FORM TEAM are not checked.  The attached
patch checks TEAM_NUMBER and TEAM.  The optional form-team-spec-list is
currently not implemented in gfortran. Add a PSA to recruit new contributors.
Comment 3 kargls 2021-12-22 23:21:05 UTC
Created attachment 52046 [details]
New diff
Comment 4 kargls 2021-12-22 23:21:42 UTC
Comment on attachment 52046 [details]
New diff

This replaces the first diff, which was prematurely created.
Comment 5 kargls 2023-05-29 23:50:07 UTC
(In reply to kargl from comment #4)
> Comment on attachment 52046 [details]
> New diff
> 
> This replaces the first diff, which was prematurely created.

The 'new diff' patch still rejects both z1.f90 and z2.f90.
Comment 6 Jerry DeLisle 2023-07-04 21:34:02 UTC
This appears to be fixed on trunk. Can we close it?
Comment 7 Steve Kargl 2023-07-07 17:50:02 UTC
On Tue, Jul 04, 2023 at 09:34:02PM +0000, jvdelisle at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103796
> 
> Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jvdelisle at gcc dot gnu.org
> 
> --- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
> This appears to be fixed on trunk. Can we close it?
> 

Yes.  Likely fixed by 

2022-05-10  Harald Anlauf  <anlauf@gmx.de>

        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.
Comment 8 anlauf 2023-07-07 18:19:04 UTC
Dup of pr105526.

*** This bug has been marked as a duplicate of bug 105526 ***
Comment 9 anlauf 2023-07-08 14:28:07 UTC
Steve correctly noted in pr105526#c5 that his patch provides parsing of
the form-team-spec-list, although it will only emit a sorry-type error
message for a not implemented feature, instead of a syntax error.

Reopening, so that his patch won't be lost.

This PR might be referenced in a suitable coarray meta-bug.
Comment 10 kargls 2023-07-08 17:04:07 UTC
Thanks Harald for re-opening the bug.  I've updated the Summary as you fixed the ICE and this now documents the missing support for form-team-spec-list.  I've also updated the Importance level.