http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57553
Bug ID: 57553 Summary: Valid use of STORAGE_SIZE rejected, bad error message for invalid use Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: diagnostic, rejects-valid Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Found at http://mailman.j3-fortran.org/pipermail/j3/2013-June/006442.html (please read also follow up email). * The following looks valid to me and it is rejected with a bogus error message: integer, parameter :: ESize = storage_size('a') 1 Error: Invalid character in name at (1) integer, parameter :: ESize = storage_size('a') end * The following is invalid, but the error message location is bad: integer, parameter :: ESize = ( storage_size(a) + 7 ) / 8 1 Error: Unclassifiable statement at (1) subroutine S ( A ) character(len=*), intent(in) :: A integer, parameter :: ESize = ( storage_size(a) + 7 ) / 8 end