------- Comment #3 from steven at gcc dot gnu dot org 2006-12-23 12:52 ------- This not-for-including patch shows that we should match "\\" in io.c and treat it as a single '\\' character. This is what g77 appears to do, too.
Index: io.c =================================================================== --- io.c (revision 120167) +++ io.c (working copy) @@ -905,6 +905,24 @@ gfc_match_format (void) check_format (); /* Guaranteed to succeed */ gfc_match_eos (); /* Guaranteed to succeed */ + { + char c1, c2; + int i, j; + int len = e->value.character.length; + for (i = 0; i < len - 1; ++i) + { + c1 = e->value.character.string[i]; + c2 = e->value.character.string[i + 1]; + if (c1 == '\\' && c2 == '\\') + { + for (j = i; j < len; ++j) + e->value.character.string[j] = e->value.character.string[j+1]; + len--; + } + } + e->value.character.length = len; + } + return MATCH_YES; } My understanding of io.c is not quite good, so perhaps someone who understands that code well can have a look at a proper fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30278