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

            Bug ID: 70696
           Summary: [6.0] ICE on EVENT POST of host-associated EVENT_TYPE
                    coarray
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at sourceryinstitute dot org
  Target Milestone: ---

With -fcoarray=lib, an internal compiler error occurs when compiling an EVENT
POST of an EVENT_TYPE coarray that accessed via host association.  The ICE
disappears if the program is compiled with -fcoarray=single or if the event is
moved into the subroutine that contains the EVENT POST.  Moving the event there
necessitates giving it the SAVE attribute, which appears to be unrelated to the
ICE because the ICE occurs with the event in the host even if given the SAVE
attribute in the host.

$ cat post_host_associated_event.f90 
  use iso_fortran_env
  type(event_type) :: x[*] 
contains
  subroutine exchange
    event post(x[1])
  end subroutine
end 
$ gfortran -fcoarray=single post_host_associated_event.f90
$ gfortran -fcoarray=lib post_host_associated_event.f90
post_host_associated_event.f90:5:0:

     event post(x[1])

internal compiler error: in gfc_get_tree_for_caf_expr, at
fortran/trans-expr.c:1852

post_host_associated_event.f90:5:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://trac.macports.org/newticket> for instructions.
$ gfortran --version
GNU Fortran (MacPorts gcc6 6-20160327_0) 6.0.0 20160327 (experimental)

Reply via email to