------- Comment #5 from burnus at gcc dot gnu dot org 2010-05-04 05:53 ------- (In reply to comment #4) > What about this? > > $ gfc -fbounds-check pr43899.f90 > $ ./a.out > &NMLIST NML_STRING='123456789' / > At line 9 of file pr43899.f90 (unit = 7, file = 'example.nml') > Fortran runtime error: Namelist object 'nml_string' exceeds length of > character variable
I like the message, but I do not like a run-time error with -fbounds-check; while it is good to have an easy-to-reach diagnostic like that, so far -fbounds-check only aborted if the program was invalid according to the Fortran standard. Here, the code probably has a problem, but the usage is valid according to the Fortran standard. Thus, I would like to see either only a warning or a different compile-time flag. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43899