[Bug fortran/83282] missing comma in format changes output

2017-12-05 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83282

Jerry DeLisle  changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org

--- Comment #2 from Jerry DeLisle  ---
Ha Ha, this is like not seeing the forest for the trees. As soon as I figure
out which comma is missing I will try to fix. Dominique, feel free to try to
find the issue, My guess is format.c, in the parsing sequences.

[Bug fortran/83282] missing comma in format changes output

2017-12-05 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83282

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-12-05
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from 4.8 up to trunk (8.0).

   write(*,'(*("["a,"]":))')array

or

   write(*,'(*("["a5"]":))')array

give the expected result.

Reduced test case

   write(*,'(aa)') "ab", "bc"
   write(*,'(a"bc")') "ab"
   write(*,'(a"cd"a)') "ab", "bc"
end

gives

abbc
ab
abc

i.e., the problem seems to occur when an 'a' descriptor is immediately followed
by a string.