------- Comment #4 from tkoenig at gcc dot gnu dot org 2010-06-11 20:27 ------- (In reply to comment #3) > (In reply to comment #2) > > Still true for gcc version 4.6.0 20100509 (experimental) (GCC) > > I don't know if it's worth the extra work, but this can be tackled in > gfc_conv_substring() by checking whether start.expr and end.expr refer to the > same var_decl (stripping conversions). If they do, the length is one.
This is one example where more powerful simplifications could help. I'm opening a separate PR for this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34145