------- Comment #31 from jv244 at cam dot ac dot uk 2009-07-24 16:56 ------- (In reply to comment #30) > Hmm, that looks unrelated ...? >
doesn't seem to happen on a clean trunk ( a few days more recent ). This is a reduced testcase for this failure: > gfortran -g bug.f90 bug.f90: In function str_search: bug.f90:32:0: internal compiler error: in splice_child_die, at dwarf2out.c:6983 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. > cat bug.f90 MODULE string_utilities CONTAINS SUBROUTINE xstring(string,ia,ib) CHARACTER(LEN=*), INTENT(IN) :: string INTEGER, INTENT(OUT) :: ia, ib ia = 1 ib = LEN_TRIM(string) IF (ib>0) THEN DO WHILE (string(ia:ia)==' ') ia = ia + 1 END DO END IF END SUBROUTINE xstring FUNCTION str_comp(str1,str2) RESULT (equal) CHARACTER(LEN=*), INTENT(IN) :: str1, str2 LOGICAL :: equal INTEGER :: i1, i2, j1, j2 i1 = 0 i2 = 0 j1 = 0 j2 = 0 CALL xstring(str1,i1,i2) CALL xstring(str2,j1,j2) equal = (str1(i1:i2)==str2(j1:j2)) END FUNCTION str_comp FUNCTION str_search(str1,n,str2) RESULT (pos) CHARACTER(LEN=*), INTENT(IN) :: str1( : ) INTEGER, INTENT(IN) :: n CHARACTER(LEN=*), INTENT(IN) :: str2 INTEGER :: pos INTEGER :: i pos = 0 DO i = 1, n IF (str_comp(str1(i),str2)) THEN pos = i EXIT END IF END DO END FUNCTION str_search END MODULE string_utilities -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40005