------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-23 07:34 ------- R527 data-implied-do is ( data-i-do-object-list , data-i-do-variable = scalar-int-expr, scalar-int-expr [ , scalar-int-expr ] ) R528 data-i-do-object is array-element or scalar-structure-component or data-implied-do
which does not include substrings. Related: character(len=20) :: a = 'xyz' data a(1:3)/'abc'/ -> Overlapping storage initializations (otherwise valid) Should be detected with -std=f95. character(len=3) :: b integer :: i data (b(i:i),i=1,3)/3*'x'/ data (b(i:i),i=2,2)/'y'/ print *, b -> Overlapping storage initializations (substrings are also not standard conform) -> Should this be detected or ignored? (This is not detected by ifort either; both ifort and gfortran print 'xxx'; if one reverses the data order, both print 'xyx'.) Observation (should be ok either way): character(len=20) :: a data a(1:3)/'abc'/ print '(":",a,":")', a gfortran prints: :abc : g95, NAG f95, ifort print: :abc: (for "a = 'abc'" they have the same as gfortran. -> preinitialized by \0 vs. by ' '?) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792