https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70697
Bug ID: 70697 Summary: ICE on EVENT WAIT with array element UNTIL_COUNT argument 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: --- An internal compiler error (ICE) results when compiling an EVENT WAIT with an UNTIL_COUNT argument that is an element of an array. This is a greatly reduced version of the example in section A.3.3 of TS 18508, which was published last year and is being incorporated into the draft Fortran 2015 standard. It would be a great idea to make sure the whole example and the other events examples compile correctly as many users will start with those. $ cat tree.f90 use iso_fortran_env integer :: nc(1) type(event_type) done[*] event wait(done,until_count=nc(1)) end $ gfortran -fcoarray=single tree.f90 tree.f90:4:0: event wait(done,until_count=nc(1)) internal compiler error: Segmentation fault: 11 tree.f90:4: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)