https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64933
Bug ID: 64933 Summary: ASSOCIATE on a character variable does not allow substring expressions Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: olivier.marsden at ecmwf dot int Created attachment 34662 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34662&action=edit gfortran 5.0 ICE output for test case The following program is generating an ICE with gcc-5-20150201, and fails with ASSOCIATE(should_work=>char_var) Error: Associate-name 'should_work' at (1) is used as array for gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux) The ICE output is attached. program test_this implicit none character(len=15) :: char_var ASSOCIATE(should_work=>char_var) should_work = "test succesful" print *, should_work(5:14) END ASSOCIATE end program