The code comes from http://www.star.le.ac.uk/~cgp/fortran.html (by Clive Page):
$ cat fcn.f90 Character (len=20) Function Up (string) Character(len=*) string Up = & transfer(merge(achar(iachar(transfer(string,"x",len(string)))- & (ichar('a')-ichar('A')) ), & transfer(string,"x",len(string)) , & transfer(string,"x",len(string)) >= "a" .and. & transfer(string,"x",len(string)) <= "z"), repeat("x", len(string))) return end function Up $ gfortran fcn.f90 fcn.f90: In function 'up': fcn.f90:1: internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:4472 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE in gfc_conv_expr_descriptor Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31257