The test case passes, but somehow _gfortran_compare_string is still called.
$ gfortran -fdump-tree-original -fdefault-integer-8 single_char_string.f90 $ grep _gfortran.*string single_char_string.f90.003t.original if (_gfortran_compare_string (MAX_EXPR <(1 - D.507) + D.508, 0>, (char[1:5] *) &c[D.507]{lb: 1 sz: 1}, 1, &b[1]{lb: 1 sz: 1}) != 0) if (_gfortran_compare_string (MAX_EXPR <(1 - D.509) + D.510, 0>, (char[1:5] *) &c[D.509]{lb: 1 sz: 1}, 1, &"a"[1]{lb: 1 sz: 1}) != 0) if (_gfortran_compare_string (1, &a[1]{lb: 1 sz: 1}, MAX_EXPR <(1 - D.511) + D.512, 0>, (char[1:5] *) &c[D.511]{lb: 1 sz: 1}) > 0) -- Summary: single_char_string.f90 fails with -fdefault-integer-8 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement 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=34145