[Bug fortran/31725] overwriting of neighbouring character array

2007-04-27 Thread KnowlesPJ at Cardiff dot ac dot uk
--- Comment #1 from KnowlesPJ at Cardiff dot ac dot uk 2007-04-27 10:34 --- Created an attachment (id=13455) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13455action=view) failing program -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31725

[Bug fortran/31725] overwriting of neighbouring character array

2007-04-27 Thread burnus at gcc dot gnu dot org
--- Comment #2 from burnus at gcc dot gnu dot org 2007-04-27 15:47 --- The program is broken / invalid: function lenstr(s) character*(*) s do 1 l=ll,1,-1 if (s(l:l).ne.' ') goto 2 1 continue Question: What value has ll ? 0, 325, -4326 ? Depending on the

[Bug fortran/31725] overwriting of neighbouring character array

2007-04-27 Thread KnowlesPJ at Cardiff dot ac dot uk
--- Comment #3 from KnowlesPJ at Cardiff dot ac dot uk 2007-04-27 16:13 --- I don't agree with this analysis, as ll is certainly defined in char3.f as attached - ll=len(s) Please try with the program exactly as supplied! Yes, you are right, this function is the same as len_trim but all

[Bug fortran/31725] overwriting of neighbouring character array

2007-04-27 Thread burnus at gcc dot gnu dot org
--- Comment #4 from burnus at gcc dot gnu dot org 2007-04-27 18:59 --- (Slabs oneself because of deleting important lines while deleting only comments.) Thanks for being persistent! Reduced test case, should print twice X,Y but prints (once) ,Y. The problem is that for