[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792 kargl at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|8.0 |6.5 --- Comment #7 from kargl at gcc dot gnu.org --- Fixed on 6-branch, 7-branch, and trunk.
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792 --- Comment #6 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Feb 24 20:24:27 2018 New Revision: 257964 URL: https://gcc.gnu.org/viewcvs?rev=257964&root=gcc&view=rev Log: 2018-02-24 Steven G. Kargl PR fortran/30792 * decl.c (gfc_match_data): Check for invalid substring in data-implied-do 2018-02-24 Steven G. Kargl PR fortran/30792 * gfortran.dg/data_substring.f90: New test. Added: branches/gcc-6-branch/gcc/testsuite/gfortran.dg/data_substring.f90 Modified: branches/gcc-6-branch/gcc/fortran/ChangeLog branches/gcc-6-branch/gcc/fortran/decl.c branches/gcc-6-branch/gcc/testsuite/ChangeLog
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792 --- Comment #5 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Feb 24 17:51:09 2018 New Revision: 257963 URL: https://gcc.gnu.org/viewcvs?rev=257963&root=gcc&view=rev Log: 2018-02-24 Steven G. Kargl PR fortran/30792 * decl.c (gfc_match_data): Check for invalid substring in data-implied-do 2018-02-24 Steven G. Kargl PR fortran/30792 * gfortran.dg/data_substring.f90: New test. Added: branches/gcc-7-branch/gcc/testsuite/gfortran.dg/data_substring.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/decl.c branches/gcc-7-branch/gcc/testsuite/ChangeLog
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792 --- Comment #4 from kargl at gcc dot gnu.org --- Author: kargl Date: Sat Feb 24 17:22:10 2018 New Revision: 257962 URL: https://gcc.gnu.org/viewcvs?rev=257962&root=gcc&view=rev Log: 2018-02-24 Steven G. Kargl PR fortran/30792 * decl.c (gfc_match_data): Check for invalid substring in data-implied-do 2018-02-24 Steven G. Kargl PR fortran/30792 * gfortran.dg/data_substring.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/data_substring.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792 kargl at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 CC||kargl at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |kargl at gcc dot gnu.org Target Milestone|--- |8.0
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792 --- Comment #3 from Dominique d'Humieres --- Still present at revision r234859.
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
--- Comment #2 from burnus at gcc dot gnu dot org 2007-06-23 13:53 --- Also the following is not allowed: data (string,i=1,1)/'hello'/ or data (string,i=1,2)/'hello','foo'/ For the second, ifort -stand f95: Warning: Overlapping storage initializations encountered with STRING For both: - NAG f95: syntax error - g95: Error: DATA element inside iterator must be an array element or a scalar structure component -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
--- 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
[Bug fortran/30792] DATA implied-do substring allowed with -std=f95/f2003
-- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-04-18 07:16:57 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30792