https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90344
Bug ID: 90344 Summary: small code that compiles and runs in 7.3.0 but not 7.4.1 Product: gcc Version: 7.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: urbanjost at comcast dot net Target Milestone: --- Created attachment 46288 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46288&action=edit minimal test case that still causes segfault The test case is the minimal code that I could get to reproduce a segmentation fault at compile time with optimization level >0 on Cygwin with gfortran 7.4.1. This same code worked in version 7.3.0. I get BUG.f90:19:0: write(*,*)all(func1(s2a('ABCDEFG')).or.func2(s2a('ABCDEFG'))) internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. Almost any change and the fault goes away. If the WRITE uses just FUNC1 or FUNC2 or does not call S2A or just about any other change and the segfault goes away. Goes away with -O0; but occurs with -O1 switch.